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

/* ---- Base (mobile) ---- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #f0e6ff 0%, #fce4f0 100%);
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0 88px; /* bottom clears fixed sidebar */
    overflow-x: hidden;
}

.container {
    width: calc(100% - 8px);
    background: white;
    border-radius: 16px;
    padding: 20px 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    text-align: center;
}

h1 { font-size: 20px; color: #333; margin-bottom: 24px; font-weight: 600; }

.screen { display: none; flex-direction: column; }
.screen.active { display: flex; }

.button-group { display: flex; gap: 12px; margin-top: 10px; }

.btn {
    flex: 1; padding: 14px; color: white; border: none;
    border-radius: 12px; font-weight: 600; font-size: 14px; cursor: pointer;
}
.btn-yes {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8db5 100%);
    transition: opacity 0.2s ease,
                transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.22s ease,
                box-shadow 0.22s ease;
}
.btn-yes:hover { opacity: 0.9; }
.btn-yes:active {
    transform: scale(0.85);
    filter: brightness(0.84);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.22);
    transition: transform 0.07s ease-in, filter 0.07s ease-in, box-shadow 0.07s ease-in;
}
.btn-no {
    background: linear-gradient(135deg, #c9a9ff 0%, #dfc5ff 100%);
    position: relative;
    z-index: 51;
    transition: filter 0.22s ease, box-shadow 0.22s ease;
}
.btn-no:active {
    filter: brightness(0.84);
    transition: filter 0.07s ease-in;
}

@keyframes emoji-pop {
    0%   { opacity: 1; transform: translateX(-50%) translateY(0)    scale(1);   }
    25%  { opacity: 1; transform: translateX(-50%) translateY(-12px) scale(1.3); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-48px) scale(0.8); }
}

#date-screen, #confirm-screen { gap: 18px; }

.form-group { text-align: left; }
.form-group label { display: block; font-size: 13px; color: #666; font-weight: 500; margin-bottom: 8px; }
.form-group input, .form-group select {
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 10px;
    font-size: 14px; font-family: inherit; cursor: pointer; background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group select:focus {
    outline: none; border-color: #ff6b9d;
    box-shadow: 0 0 0 3px rgba(255,107,157,0.15);
}
.form-group input.highlight {
    border-color: #ff6b9d;
    box-shadow: 0 0 0 3px rgba(255,107,157,0.25);
}

.btn-submit {
    padding: 14px; background: linear-gradient(135deg, #ff6b9d 0%, #ff8db5 100%);
    color: white; border: none; border-radius: 12px; font-weight: 600;
    font-size: 14px; cursor: pointer;
    transition: opacity 0.2s ease,
                transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.22s ease,
                box-shadow 0.22s ease;
}
.btn-submit:hover { opacity: 0.9; }
.btn-submit:active {
    transform: scale(0.85);
    filter: brightness(0.84);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.22);
    transition: transform 0.07s ease-in, filter 0.07s ease-in, box-shadow 0.07s ease-in;
}

.btn-back {
    padding: 10px; background: none; color: #999;
    border: none; font-size: 13px; cursor: pointer;
    transition: color 0.2s ease,
                transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.22s ease;
}
.btn-back:hover { color: #666; }
.btn-back:active {
    transform: scale(0.85);
    opacity: 0.5;
    transition: transform 0.07s ease-in, opacity 0.07s ease-in;
}

#final-screen, #rejected-screen { gap: 16px; }
.final-emoji { font-size: 48px; }

.pet-image {
    width: 100%; height: 220px; border-radius: 12px;
    object-fit: cover; object-position: center top;
    margin: 0 auto 20px; display: block;
}

/* Mobile: sidebar is a horizontal row pinned to bottom centre */
.pet-sidebar {
    position: fixed; bottom: 20px; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: row; gap: 8px;
    z-index: 50;
    background: white; border-radius: 14px;
    padding: 6px 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.pet-sidebar button {
    width: 40px; height: 40px; border-radius: 10px;
    border: 2px solid #eee; background: white;
    font-size: 20px; cursor: pointer;
    transition: border-color 0.2s,
                transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pet-sidebar button.active { border-color: #ff6b9d; }
.pet-sidebar button:hover { border-color: #c9a9ff; }
.pet-sidebar button:active {
    transform: scale(0.85);
    transition: transform 0.07s ease-in;
}

.confirm-summary {
    font-size: 15px; color: #555; line-height: 1.8;
    margin-bottom: 10px;
}
.confirm-summary strong { color: #333; }

#chances-left { font-size: 9px; }

/* ---- Desktop (480px+) ---- */
@media (min-width: 480px) {
    body {
        padding: 20px;
    }

    .container {
        width: 90%;
        max-width: 400px;
        padding: 32px 24px;
        border-radius: 20px;
    }

    h1 { font-size: 22px; margin-bottom: 30px; }

    .button-group { gap: 16px; }

    #date-screen, #confirm-screen { gap: 20px; }

    .pet-image { height: 325px; border-radius: 16px; }
    #chances-left { font-size: 11px; }

    /* Desktop: sidebar is a vertical column pinned to right */
    .pet-sidebar {
        right: 20px; top: 50%; bottom: auto; left: auto;
        transform: translateY(-50%);
        flex-direction: column;
        background: none;
        box-shadow: none;
        padding: 0;
    }
}
