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

body{

    font-family:Montserrat,sans-serif;

    background:#f7f2ec;
    background: url('../img/bg.webp') no-repeat;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    min-height: 100vh;

    overflow:hidden;

    height:100vh;

    color:#47392d;

}

/*.background{

    position:fixed;

    inset:0;

    background:
        radial-gradient(circle at top left,
        rgba(255,255,255,0.8),
        transparent),

        linear-gradient(
        135deg,
        #faf7f3,
        #efe4d7
        );

    z-index:-1;

}*/

.container{

    display:grid;

    grid-template-columns:1fr 1fr;

    height:100vh;

    padding:50px;

    gap:50px;

}

.camera-panel{

    display:flex;

    align-items:center;

    justify-content:center;

}

.camera-wrapper{

    width:100%;

    max-width:700px;

    border-radius:30px;

    overflow:hidden;

    position:relative;

    /*background:white;*/

    box-shadow:
        0 25px 60px rgba(0,0,0,.12);

}

video{

    width:100%;

    display:block;

    object-fit:cover;

    aspect-ratio:4/3;

}

.camera-label{

    position:absolute;

    bottom:20px;

    left:20px;

    padding:12px 18px;

    border-radius:50px;

    background:rgba(255,255,255,.85);

    backdrop-filter:blur(10px);

}

.form-panel{

    display:flex;

    flex-direction:column;

    justify-content:center;

}

h1{

    font-family:'Cormorant Garamond';

    font-size:72px;

    font-weight:700;

}

.subtitle{

    margin-top:10px;

    margin-bottom:40px;

    font-size:18px;

    opacity:.7;

}

label{

    display:block;

    margin-top:20px;

    margin-bottom:10px;

}

input,
textarea{

    width:100%;

    border:none;

    border-radius:18px;

    padding:18px;

    background:white;

    font-size:16px;

    box-shadow:
        0 10px 25px rgba(0,0,0,.06);

}

textarea{

    resize:none;

    height:220px;

}

.counter{

    margin-top:8px;

    text-align:right;

    font-size:14px;

    opacity:.7;

}

button{

    border:none;

    border-radius:50px;

    cursor:pointer;

    transition:0.3s;

}

form button{

    margin-top:35px;

    background:#c9a27e;

    color:white;

    font-size:18px;

    padding:18px;

}

form button:hover{

    transform:translateY(-2px);

}

.timeout{

    margin-top:30px;

    display:flex;

    align-items:center;

    justify-content:space-between;

}

#extendBtn{

    padding:12px 20px;

    background:white;

}

#countdown{

    font-weight:bold;

}

#successMessage{

    display:none;

    margin-top:25px;

    padding:20px;

    border-radius:20px;

    background:white;

    text-align:center;

}

canvas{

    display:none;

}

@media(max-width:1100px){

.container{

grid-template-columns:1fr;

overflow:auto;

height:auto;

}

h1{

font-size:48px;

}

}
#photoGallery{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:10px;
    margin-top:15px;
}

#photoGallery img{
    width:100%;
    border-radius:10px;
    object-fit:cover;
    aspect-ratio:1/1;
    box-shadow:0 5px 15px rgba(0,0,0,0.1);
}
#photoGallery span{
    width:100%;
    border-radius:10px;
    object-fit:cover;
    aspect-ratio:1/1;
    box-shadow:0 5px 15px rgba(0,0,0,0.1);
}

.photo-warning{
    display:none;
    color:#c0392b;
    margin-top:10px;
    font-size:14px;
}

button#takePhotoBtn{
    margin-top:10px;
    background:#333;
    color:white;
    padding:12px;
    border-radius:30px;
    width: 100%;
}

@media(max-width:768px){

.delivery-row{

    flex-direction:column;

    align-items:flex-start;

}

#wishDate{

    width:100%;

}

}

.delivery-row{

    display:flex;

    align-items:center;

    gap:20px;



}

.delivery-options{

    display:flex;

    gap:25px;

    align-items:center;

}

.delivery-options label{

    display:flex;

    align-items:center;

    gap:8px;

    margin:0;

}

#wishDate{

    width:100%;


}

@media (max-width: 900px){

    html,
    body{

        height:auto;
        padding-top: 50px;
        min-height:100vh;

    }

    body{

        overflow-y:auto;

        overflow-x:hidden;

    }

}

.timer-widget{

    position:fixed;

    top:20px;

    right:20px;

    z-index:1000;

    display:flex;

    align-items:center;

    gap:12px;

    padding:12px 18px;

    border-radius:40px;

    background:rgba(255,255,255,.88);

    backdrop-filter:blur(12px);

    box-shadow:

        0 10px 30px rgba(0,0,0,.08);

}

.guestbook-container {
    width: min(900px, 90vw);
    margin: 0 auto;

    padding: 35px;

    background: rgba(255, 255, 255, 0.92);

    border-radius: 25px;

    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.25);

    box-sizing: border-box;
}

@media (max-width: 700px) {

    body {
        background-position: center center;
    }

    .page {
        align-items: flex-start;

        padding: 20px 10px;

        overflow-y: auto;
    }

    .guestbook-container {
        width: 100%;

        padding: 22px 18px;

        border-radius: 18px;
    }

}
/* ...existing code... */

body {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    margin: 0;
    color: #403638;
    background-color: #f8f2ec;
}

.background {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.background::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(250, 246, 241, 0.68), rgba(250, 246, 241, 0.28)),
        radial-gradient(ellipse at center, transparent 35%, rgba(71, 54, 47, 0.14));
}

.container {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 3vw, 2.5rem);
    /*width: min(1080px, calc(100% - 2rem));*/
    margin: 1rem auto 1rem;
}

.camera-panel,
.form-panel {
    box-sizing: border-box;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border: 1px solid rgba(112, 83, 72, 0.18);
    border-radius: 22px;
    background: rgba(255, 252, 248, 0.88);
    box-shadow: 0 16px 48px rgba(69, 49, 41, 0.16);
    backdrop-filter: blur(1px);
}

.form-panel h1 {
    margin-top: 0;
    color: #70524d;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.5rem, 5vw, 3.6rem);
    text-align: center;
}

.subtitle {
    color: #786966;
    line-height: 1.6;
    text-align: center;
}

#video {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    background: #e9dfd7;
    object-fit: cover;
}

.form-panel input,
.form-panel select,
.form-panel textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #ddcec5;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    color: #403638;
    font: inherit;
}

.form-panel input,
.form-panel select {
    min-height: 48px;
    padding: 0.7rem 0.85rem;
}

.form-panel textarea {
    min-height: 140px;
    padding: 0.85rem;
    resize: vertical;
}

.form-panel input:focus,
.form-panel select:focus,
.form-panel textarea:focus {
    border-color: #9a7167;
    outline: none;
    box-shadow: 0 0 0 3px rgba(154, 113, 103, 0.16);
}

#takePhotoBtn,
.form-panel button[type="submit"],
#extendBtn {
    border: 0;
    border-radius: 999px;
    background: #80605b;
    color: #fff;
    cursor: pointer;
    font: inherit;
    transition: background 160ms ease, transform 160ms ease;
}

#takePhotoBtn,
.form-panel button[type="submit"] {
    min-height: 48px;
    padding: 0.75rem 1.25rem;
}

.form-panel button[type="submit"] {
    width: 100%;
    margin-top: 1rem;
}

#takePhotoBtn:hover,
.form-panel button[type="submit"]:hover,
#extendBtn:hover {
    transform: translateY(-1px);
    background: #684b47;
}

.timer-widget {
    position: fixed;
    z-index: 2;
    top: 1rem;
    right: rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(112, 83, 72, 0.18);
    border-radius: 999px;
    background: rgba(255, 252, 248, 0.92);
    box-shadow: 0 6px 20px rgba(69, 49, 41, 0.12);
    color: #665451;
    font-size: 0.85rem;
}

#extendBtn {
    padding: 0.55rem 0.9rem;
}

@media (max-width: 760px) {
    .container {
        grid-template-columns: 1fr;
        width: min(560px, calc(100% - 1.25rem));
        margin-top: 5rem;
    }

    .timer-widget {
        top: 0.6rem;
        right: 0.6rem;
        left: 0.6rem;
        justify-content: center;
    }
}

.camera-preview {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #e9dfd7;
}

.camera-preview #video {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

#cameraLogo {
    position: absolute;
    right: 5%;
    bottom: 5%;
    z-index: 1;
    width: min(34%, 180px);
    max-height: 22%;
    object-fit: contain;
    pointer-events: none;
}
.camera-preview {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    background: #e9dfd7;
}

.camera-preview #video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-preview #logo {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
#qr {
    display: block;
    margin: 0 auto;
    width: min(120px, 20vw);
    max-width: 160px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}
.couple-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.couple-heading #qr {
    flex: 0 0 auto;
    width: clamp(3.5rem, 6vw, 5rem);
    height: clamp(3.5rem, 6vw, 5rem);
    margin: 0;
    object-fit: contain;
}