@import url('https://fonts.googleapis.com/css2?family=Aboreto&family=Noto+Serif+TC:wght@600;900&family=Petit+Formal+Script&display=swap');

:root{
    --flower-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 60'%3E%3Cg fill='%23c9b79a'%3E%3Cellipse cx='20' cy='15' rx='8' ry='14'/%3E%3Cellipse cx='20' cy='15' rx='8' ry='14' transform='rotate(72 20 15)'/%3E%3Cellipse cx='20' cy='15' rx='8' ry='14' transform='rotate(144 20 15)'/%3E%3Cellipse cx='20' cy='15' rx='8' ry='14' transform='rotate(216 20 15)'/%3E%3Cellipse cx='20' cy='15' rx='8' ry='14' transform='rotate(288 20 15)'/%3E%3Ccircle cx='20' cy='15' r='5' fill='%23807874'/%3E%3C/g%3E%3C/svg%3E");
}

html{scroll-behavior: smooth;}
body,html{height: 100%;}

body{
    margin: 0;
    padding: 0;
    font-family: 'Aboreto','Noto Serif TC',serif;
    color: rgb(128, 129, 116);
    background-color: rgb(196, 197, 191);
    text-align: center;
    text-indent: 3px;
    letter-spacing: 3px;
    font-size: 14px;
    font-weight: 600;
    line-height: 2;
}

::selection{
    color: rgb(128, 129, 116);
    background-color: rgba(38, 39, 32,0.7);
}

h1{
    font-size: 12px;
    margin-top: 50px;
    font-weight: 900;
}

h2{
    font-size: 25px;
    font-family: 'Petit Formal Script', cursive;
    font-weight: 400;
    letter-spacing: 0;
}

header{
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: rgb(255, 255, 255);
    background-image: linear-gradient(rgba(196, 197, 191, 0) 50%,rgba(196, 197, 191, 1));
    overflow: hidden;
}

header h1{
    font-size: 13px;
    letter-spacing: 4px;
}

header h1 span.amp{
    font-size: 10px;
}

header a{
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 110px;
    bottom: 0px;
    text-decoration: none;
    color: rgba(255, 255, 255,0.8);
}

header a p{
    font-size: 12px;
    letter-spacing: 1px;
    padding-bottom: 10px;
    animation-name: scrollp;
    animation-iteration-count: infinite;
    animation-duration: 2s;
    transform: translateY(0);
}

@keyframes scrollp{
    0% { transform: translateY(0); }
    50% { transform: translateY(10px); }
    100% { transform: translateY(0); }
}

#scroll-line{
    display: block;
    height: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    animation-name: scroll-line;
    animation-iteration-count: infinite;
    animation-duration: 1s;
}

@keyframes scroll-line{
    0% { height: 0; }
    100% { height: 60px; }
}

.bg{
    width: 100%;
    height: 100%;
    position: fixed;
    background-size: cover;
    background-position: center;
    z-index: -99;
}

#homebg{
    background-position: 50% 40%;
    background-image: url("reference/網頁用圖/background1.JPG");
    z-index: -100;
}
#secondbg{
    background-image: url("reference/網頁用圖/background2.JPG");
    display: none;
}
#thirdbg{
    background-image: url("reference/網頁用圖/background3.JPG");
    filter: brightness(160%);
    display: none;
}

#intro{
    padding: 150px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background-color: rgb(196, 197, 191);
    overflow: hidden;
}

.intro-box{
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background-color: rgba(211, 211, 207);
    border-radius: 8px;
    padding: 100px 50px 50px 50px;
    margin: 150px 40px;
    width: 270px;
    opacity: 0;
    transform: translateY(100px);
    transition: 1s;
}

.intro-box.active{
    opacity: 1;
    transform: translateX(0);
}

#groom, #bride{
    position: absolute;
    top: -80px;
    left: 49%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 300px;
    border-radius: 100px 100px 0 0;
    box-shadow: 15px 15px 0px rgb(226, 226, 223);
    background-repeat: no-repeat;
}

#groom{
    background-image: url('reference/網頁用圖/avatar_groom.jpg');
    background-position: 50% 30%;
    background-size: cover;
}

#bride{
    background-image: url('reference/網頁用圖/avatar_bride.jpg');
    background-position: 50% 20%;
    background-size: cover;
}

.intro-content{
    text-align: left;
    text-indent: 0;
    font-size: 12px;
    letter-spacing: 1px;
    line-height: 1.8;
    opacity: 0;
    transition: 1.5s;
}

.intro-content.active{
    opacity: 1;
}

.intro-title{
    position: absolute;
    font-family: 'Petit Formal Script', cursive;
    font-size: 25px;
    letter-spacing: 0;
    bottom: -25px;
    right: 0px;
}

.intro-title::after{
    content: '';
    position: absolute;
    height: 50px;
    width: 20px;
    background-image: var(--flower-svg);
    background-repeat: no-repeat;
    background-size: contain;
    transform: rotate(15deg);
    right: -3px;
    bottom: 5px;
    opacity: 0.6;
    z-index: -1;
    pointer-events: none;
}

#invite{
    padding: 100px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgb(74, 63, 53);
    background-color: rgba(245, 242, 235, 0.85);
    overflow: hidden;
}

#invite div{
    position: relative;
    width: 350px;
}

.invite-img{
    width: 70%;
    max-width: 250px;
    aspect-ratio: 1 / 1.5;
    border-radius: 200px 200px 0 0;
    margin: auto;
    background-image: url('reference/gallery/thumbs/IMG_0279.JPG');
    background-size: cover;
    background-position: 50% 20%;
}

#invite-flower1{
    position: absolute;
    width: 20px;
    height: 30px;
    bottom:50px;
    right: 50px;
    background-image: var(--flower-svg);
    background-repeat: no-repeat;
    background-size: contain;
    filter: brightness(200%);
    transform: rotate(-10deg);
    animation-name: smallflower;
    animation-iteration-count: infinite;
    animation-duration: 1s;
    pointer-events: none;
    user-select:none;
}

@keyframes smallflower{
    0% { transform: rotate(-10deg); }
    50% { transform: rotate(-5deg); }
    100% { transform: rotate(-10deg); }
}

#invite-flower2{
    position: absolute;
    width: 30px;
    height: 45px;
    bottom: 40px;
    right: 18px;
    background-image: var(--flower-svg);
    background-repeat: no-repeat;
    background-size: contain;
    filter: brightness(200%);
    transform: rotate(15deg);
    animation-name: bigflower;
    animation-iteration-count: infinite;
    animation-duration: 1s;
    pointer-events: none;
    user-select:none;
}

@keyframes bigflower{
    0% { transform: rotate(15deg); }
    50% { transform: rotate(10deg); }
    100% { transform: rotate(15deg); }
}

#invite h2{
    position: absolute;
    font-size: 28px;
    bottom: -50px;
    width: 100%;
    color: rgb(255, 255, 255);
    opacity: 0;
    transition: 0.7s;
    transform: translateY(50px);
}

#invite h2.active{
    opacity: 1;
    transform: translateY(0);
}

#invite p{
    padding: 30px 20px 0 20px;
    text-indent: 6px;
    letter-spacing: 6px;
    opacity: 0;
    transition: 0.7s;
    transition-delay: 0.1s;
    transform: translateY(50px);
}

#invite p.active{
    opacity: 1;
    transform: translateY(0);
}

/* Sub-heading under the date on the homecoming page's hero */
.header-sub{
    margin: 0;
    font-size: 12px;
    letter-spacing: 8px;
    color: rgba(255, 255, 255, 0.85);
}

#schedule{
    position: relative;
    padding: 50px 0 150px 0;
    background-color: rgb(196, 197, 191);
    overflow: hidden;
}

#timeline{
    position: relative;
    margin: auto;
    padding-top: 50px;
    display: grid;
    grid-auto-columns: 1fr;
    grid-template-areas:
      'time1 activity1'
      'time2 activity2'
      'time3 activity3';
    width: 260px;
    row-gap: 50px;
    justify-content: center;
}

/* Two-step timeline (homecoming banquet: 入席 / 開席 only) */
#timeline.timeline-2{
    grid-template-areas:
      'time1 activity1'
      'time2 activity2';
}

#timeline::before{
    content: '';
    position: absolute;
    width: 0;
    height: 85%;
    top: 90px;
    left: 25%;
    border-left: 1px solid rgb(128, 129, 116);
}

#timeline.timeline-2::before{ height: 55%; }

#timeline div{
    display: flex;
    align-items: center;
    justify-content: center;
}

.time{
    font-size: 12px;
    width: 75px;
    height: 70px;
    border-radius: 50%;
    padding-top: 5px;
    line-height: 1.5;
    justify-self: center;
    color: rgb(255, 255, 255);
    background-color: rgb(128, 129, 116);
    transform: scale(0.7);
}

.time.active{
    animation-name: time-animation;
    animation-duration: 1.5s;
    animation-fill-mode: forwards;
}

@keyframes time-animation{
    0%{ transform: scale(0.7); }
    50%{ transform: scale(1); }
    100%{ transform: scale(0.9); }
}

.activity{
    letter-spacing: 6px;
}

#time1{ grid-area: time1; }
#time2{ grid-area: time2; }
#time3{ grid-area: time3; }
#activity1{ grid-area: activity1; }
#activity2{ grid-area: activity2; }
#activity3{ grid-area: activity3; }

#right-flowers{ position: absolute; top: 20%; right: 0; }
#left-flowers{ position: absolute; bottom: 20%; left: 0; }

.flowers{
    display: inline-block;
    position: relative;
    width: 25px;
    height: 40px;
    opacity: 0.5;
    pointer-events: none;
    user-select:none;
    background-image: var(--flower-svg);
    background-repeat: no-repeat;
    background-size: contain;
}

#left-flower1{ transform: rotate(15deg); }
#left-flower2{ transform: rotate(30deg); top:-17px; left: -5px; }
#right-flower1{ transform: scaleX(-1) rotate(40deg); top:-10px; right: -35px; }
#right-flower2{ transform: rotate(-15deg); top:-40px; right: -8px; }
#right-flower3{ transform: scaleX(-1) rotate(10deg); }

#traffic{ background-color: rgb(196, 197, 191); }

#traffic h2{
    padding: 20px 5px 0 5px;
    background-color: rgba(211, 211, 207,1);
    border-radius: 70px 70px 0 0;
    width: 130px;
    top: -70px;
    position: absolute;
}

#traffic h2::before{
    content: '';
    position: absolute;
    border: 1px solid rgba(211, 211, 207,1);
    border-radius: 75px 75px 0 0;
    width: 105%;
    height: 110%;
    top: -5px;
    left: -4.5px;
}

#traffic-box{
    padding: 50px 0;
    background-color: rgba(211, 211, 207,1);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}

#traffic-box::before{
    content: '';
    position: absolute;
    border-top: 1px solid rgba(211, 211, 207,1);
    width: 100%;
    top: -5px;
    left: 0;
}

#traffic-box::after{
    content: '';
    position: absolute;
    border-top: 1px solid rgba(211, 211, 207,1);
    width: 100%;
    bottom: -5px;
    left: 0;
    z-index: 2;
}

.map{
    width: 90%;
    max-width: 500px;
    aspect-ratio: 4 / 3;
    position: relative;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, rgb(180,181,175), rgb(211,211,207));
    overflow: hidden;
}

.map iframe{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

#traffic-content{
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 50px;
    letter-spacing: 4px;
    max-width: 600px;
}

.theplace{
    color: rgb(255, 255, 255);
    background-color: rgb(128, 129, 116);
    padding: 10px;
    border-radius: 40px;
    font-weight: 900;
    text-align: center;
    opacity: 0;
    transition: 1s;
}

.theplace.active{ opacity: 1; }

.guide{
    text-align: left;
    text-indent: 0;
    padding: 20px 0 0 10px;
    display: grid;
    grid-template-columns: 25px auto;
    row-gap: 15px;
    opacity: 0;
    transform: translateY(100px);
    transition: 1s;
}

.guide.active{ opacity: 1; transform: translateY(0); }

#dresscode{
    padding: 200px 0;
    position: relative;
    background-color: rgb(196, 197, 191);
    overflow: hidden;
}

.dresscode-box{
    width: 0px;
    margin: auto;
    position: relative;
    opacity: 0;
    transition: 1s;
}

.dresscode-box.active{ opacity: 1; width: 340px; }

.dresscode-img{
    position: absolute;
    width: 80%;
    height: 120%;
    background-image: url('reference/gallery/thumbs/IMG_0344.JPG');
    background-repeat: no-repeat;
    background-size: cover;
    left: -55%;
    top: -10%;
}

.dresscode-img::after{
    content: '';
    position: absolute;
    background-color: rgba(196, 197, 191,0.6);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

#dresscode-flower{
    position: absolute;
    bottom: 10px;
    right: -32px;
    pointer-events: none;
    user-select:none;
}

#dresscode-flower1{ width: 15px; transform: rotate(15deg); }
#dresscode-flower2{ transform: rotate(40deg); left: -8px; bottom: -10px; opacity: 0; }

.dresscode-box h2{
    position: absolute;
    top:-25px;
    left: 50%;
    transform: translate(-50%,-50%);
    white-space: nowrap;
    z-index: 2;
}

#dresscode-content{
    background-color: rgb(180, 181, 175);
    width: 90%;
    height: 90%;
    margin: auto;
    white-space: nowrap;
    position: relative;
}

#dresscode-content::after{
    position: absolute;
    content: '';
    border: 1px solid rgb(196, 197, 191);
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    top: 10px;
    left: 10px;
}

#dresscode-grid{
    display: grid;
    grid-template-columns: auto auto;
    gap: 20px;
    padding: 40px;
    align-items: center;
    justify-content: center;
}

.dresscode-note{
    padding: 0 30px 30px 30px;
    font-size: 12px;
    letter-spacing: 4px;
    line-height: 1.8;
}

.circle{ width: 60px; height: 60px; border-radius: 50%; }

#circle1{ background-color: #EDE7DB; }
#circle2{ background-color: #D8CFBE; }
#circle3{ background-color: #A69F8D; }
#circle4{ background-color: #77624B; }
#circle5{ background-color: #717171; }

.dresscode-label{
    text-align: left;
    font-size: 11px;
    letter-spacing: 1px;
}

.photo-video{
    position: relative;
    background-color: rgb(196, 197, 191);
    padding: 0 0 150px 0;
    overflow: hidden;
}

.photo-video h2::before{
    content: '';
    position: absolute;
    height: 50px;
    width: 20px;
    background-image: var(--flower-svg);
    background-repeat: no-repeat;
    background-size: contain;
    transform: rotate(20deg) translate(80px,-40px);
    opacity: 0.5;
    pointer-events: none;
    user-select:none;
}

.photo{
    position: relative;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('reference/gallery/thumbs/IMG_0300.JPG');
    width: 200px;
    height: 270px;
    border-radius: 130px 130px 0 0;
    box-shadow: -15px 15px 0px rgb(226, 226, 223);
    margin: 0 auto 100px auto;
    opacity: 0;
    transform: translate(-50px);
}

.photo.active{ opacity: 1; transform: translate(0); transition: 1s; }

.photo a:link, .photo a:visited{
    position: absolute;
    left: -80px;
    bottom: -30px;
    color: rgba(255, 255, 255,0.8);
    border: 1px solid rgb(128, 129, 116);
    background-color: rgb(128, 129, 116);
    text-decoration: none;
    font-weight: 900;
    padding: 10px 20px;
    border-radius: 70px;
    transition: 0.5s;
}

.photo a:hover, .photo a:active{
    color: rgb(128, 129, 116);
    border: 1px solid rgb(128, 129, 116);
    background-color: rgb(196, 197, 191);
}

#closebutton:link, #closebutton:visited{
    position: fixed;
    z-index: 101;
    right: 30px;
    top: 0;
    color: rgb(128, 129, 116);
    font-size: 40px;
    font-weight: 900;
    text-decoration: none;
    transition: 0.5s;
    display: none;
}

#closebutton:hover, #closebutton:active{ transform: scale(1.2); }

#gallery{
    background-color: rgba(196, 197, 191,0.95);
    position: fixed;
    z-index: 100;
    overflow-y: auto;
    height: 100%;
    width: 100%;
    top: 0;
    display: none;
}

#photo-gallery{
    text-indent: 0;
    padding: 100px 30px 60px 30px;
    display: none;
}

#photo-gallery-grid{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 900px;
    margin: 0 auto;
}

#photo-gallery-grid img{
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.4s, transform 0.4s;
}

#photo-gallery-grid img:hover{ opacity: 0.85; transform: scale(1.02); }

#photo-gallery p{ padding-top: 30px; }

@media screen and (min-width: 700px){
    #photo-gallery-grid{ grid-template-columns: repeat(4, 1fr); }
}

/* full-image viewer inside gallery overlay */
#photo-viewer{
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(30,28,24,0.92);
    z-index: 105;
    align-items: center;
    justify-content: center;
}

#photo-viewer img{
    max-width: 90vw;
    max-height: 86vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

#photo-viewer .viewer-nav{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgb(230,230,225);
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
}

#photo-viewer .viewer-prev{ left: 10px; }
#photo-viewer .viewer-next{ right: 10px; }

.countdown-area{
    background-color: rgb(196, 197, 191);
    padding: 0 10px 100px 10px;
    margin: auto;
    text-align: center;
    overflow: hidden;
}

.countdown-area h2{ position: relative; }

.countdown-area h2::before{
    content: '';
    position: absolute;
    height: 50px;
    width: 20px;
    background-image: var(--flower-svg);
    background-repeat: no-repeat;
    background-size: contain;
    transform: rotate(20deg) translate(150px,-100px);
    opacity: 0.5;
    pointer-events: none;
    user-select:none;
}

.countdown-area>p{ padding: 20px 0; }

.countdown-area-box{
    max-width: 700px;
    margin: 20px auto 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    justify-content: center;
}

.countdown-area-box>div{ font-size: 21px; transform: translateY(-50px); opacity: 0; }
.countdown-area-box>div.active{ transform: translateY(0); opacity: 1; transition: 1.5s; }
.countdown-area-box>div.active:nth-child(2){ transition-delay: 0.5s; }
.countdown-area-box>div.active:nth-child(3){ transition-delay: 1s; }
.countdown-area-box>div.active:nth-child(4){ transition-delay: 1.5s; }

#RSVP{
    padding: 100px 0;
    background-color: rgba(196, 197, 191,0.95);
    overflow: hidden;
}

#RSVPcircle{
    display: inline-block;
    margin: auto;
    padding: 10px 18px 10px 20px;
    border: 3px double rgba(128, 129, 116,0.7);
    border-radius: 50%;
    opacity: 1;
    text-indent: 0;
    line-height: 1.5;
    font-family: 'Petit Formal Script', cursive;
    font-size: 20px;
}

#RSVParea{ max-width: 320px; margin: 20px auto 0 auto; }

.attend{
    position: relative;
    padding: 8px 22px;
    margin: 8px 6px;
    cursor: pointer;
    display: inline-block;
    font-weight: 900;
    border: 1px solid rgba(128, 129, 116, 0.5);
    border-radius: 30px;
    color: rgb(128, 129, 116);
    background-color: transparent;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.attend input{ position: absolute; opacity: 0; }

.attend:has(input:checked){
    background-color: rgb(128, 129, 116);
    border-color: rgb(128, 129, 116);
    color: rgb(255, 255, 255);
}

.attend .flower-deco{
    position: absolute;
    width: 20px;
    height: 30px;
    top: -10px;
    opacity: 0;
    transition: 0.5s;
    pointer-events: none;
    user-select:none;
    background-image: var(--flower-svg);
    background-repeat: no-repeat;
    background-size: contain;
}

.attend-flower1{ left: 0; transform: scaleX(-1) rotate(20deg); }
.attend-flower2{ right: 0; transform: rotate(20deg); }
.attend:hover .flower-deco{ opacity: 0.5; }
.attend input:checked ~ .flower-deco{ opacity: 1; }

.form-grid{ text-indent: 0; text-align: left; margin: 15px 0 ; }
.form-title{ font-weight: 900; margin-top: 50px; }

input:not([type=submit]), select, textarea{
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    letter-spacing: 2px;
    font-size: 13px;
    color: rgb(91, 93, 79);
    background-color: rgba(128, 129, 116, 0.5);
    border: none;
    border-radius: 0;
    font-family: 'Noto Serif TC',serif;
}

input:focus, select:focus, textarea:focus{ outline: none; }

select{
    padding: 8px 0;
    text-indent: 7px;
    height: 32px;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
}

textarea{ display: block; width: 100%; resize: none; margin-bottom: 0; }

::placeholder{ color: rgba(91, 93, 79,0.7); font-family: 'Noto Serif TC',serif; }

.AandK{ display: flex; align-items: center; gap: 6px; }
.AandK label{ font-size: 12px; white-space: nowrap; }
.AandK select{ width: auto; flex: 1; }

.field-error{
    display: block;
    font-size: 11px;
    color: rgb(150, 76, 55);
    letter-spacing: 1px;
    text-indent: 0;
    min-height: 14px;
    margin-top: 4px;
}

#addressRow.is-hidden{ display: none; }

input[type=submit]{
    color: rgba(128, 129, 116, 1);
    background-color: rgba(128, 129, 116, 0);
    border: 1px solid rgba(128, 129, 116, 1);
    padding: 10px 20px;
    margin-top: 50px;
    border-radius: 20px;
    text-indent: 5px;
    letter-spacing: 5px;
    font-family: 'Noto Serif TC',serif;
    font-size: 13px;
    font-weight: 900;
    transition: 1s;
    cursor: pointer;
}

@media (hover){
    input[type=submit]:hover, input[type=submit]:active{
        color: rgba(196, 197, 191, 1);
        background-color: rgb(128, 129, 116);
        cursor: pointer;
    }
}

#loading{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 120;
}

#loader{
    border: 8px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    border-top: 8px solid rgba(255, 255, 255, 0);
    width: 70px;
    height: 70px;
    animation: spin 1s linear infinite;
}

@keyframes spin{ 0%{ transform: rotate(0deg); } 100%{ transform: rotate(360deg); } }

#submit-success{
    width: 100%;
    height: 100%;
    color: rgb(196, 197, 191);
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 130;
    position: fixed;
    top: 0;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#submit-success h1{ position: relative; font-size: 20px; font-weight: 900; }

#submit-success>div{
    background-color: rgb(128, 129, 116);
    padding: 50px 70px;
    position: relative;
}

#submit-success>div::before{
    content: '';
    position: absolute;
    border: 1px solid rgba(196, 197, 191,0.5);
    width: 95%;
    height: 95%;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}

#submit-success>div>div{ margin: 30px 0 50px 0; position: relative; }

#submit-success a:link, #submit-success a:visited{
    position: relative;
    color: rgb(196, 197, 191);
    border: 1px solid rgb(196, 197, 191);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    transition: 0.5s;
    cursor: pointer;
}

#submit-success a:hover, #submit-success a:active{
    color: rgb(128, 129, 116);
    background-color: rgb(196, 197, 191);
}

#music-onoroff{
    width: 100%;
    height: 100%;
    color: rgb(196, 197, 191);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 140;
    position: fixed;
    top: 0;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#music-onoroff.is-hidden{ display: none; }

#music-onoroff>div{
    background-color: rgb(128, 129, 116);
    padding: 100px 40px;
    position: relative;
}

#music-onoroff>div::before{
    content: '';
    position: absolute;
    border: 1px solid rgba(196, 197, 191,0.5);
    width: 95%;
    height: 95%;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}

#music-onoroff a:link, #music-onoroff a:visited{
    position: relative;
    display: inline-block;
    color: rgb(196, 197, 191);
    border: 1px solid rgb(196, 197, 191);
    text-decoration: none;
    padding: 5px 20px;
    margin-bottom: 40px;
    border-radius: 20px;
    transition: 0.5s;
}

#music-onoroff a:link:last-of-type{
    border: none;
}

#music-onoroff a:hover, #music-onoroff a:active{
    color: rgb(128, 129, 116);
    background-color: rgb(196, 197, 191);
}

.music-button{
    position: fixed;
    bottom: 10px;
    right: 20px;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgb(255, 255, 255);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    z-index: 110;
    animation: musicbutton 1.5s;
}

@keyframes musicbutton{
    0%{ transform: rotate(-10deg); }
    20%{ transform: rotate(10deg); }
    40%{ transform: rotate(-10deg); }
    60%{ transform: rotate(10deg); }
    80%{ transform: rotate(-10deg); }
    100%{ transform: rotate(0); }
}

.music-off-line{
    position: absolute;
    width: 80%;
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    transform: rotate(45deg);
    transform-origin: top left;
    top: 20%;
    left: 25%;
    transition: 0.5s;
}

.music-off-line.playmusic{ width: 0; }

footer{
    padding: 30px 0;
    color: rgb(255,255,255);
    background-color: rgb(196, 197, 191);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    position: relative;
}

footer>a{
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    color: rgba(255,255,255,0.7);
    background-color: rgb(196, 197, 191);
    font-size: 10px;
    text-indent: 2px;
    text-decoration: none;
    top: -30px;
    padding: 15px 10px 0 10px;
    border-radius: 30px 30px 0 0;
    cursor: pointer;
}

footer div{ padding: 5px 0; }

.footer-signature{
    font-family: 'Petit Formal Script', cursive;
    font-size: 28px;
    letter-spacing: 2px;
}

@media screen and (min-width: 800px) {
    #timeline{
        grid-template-areas:
        'time1 time2 time3'
        'activity1 activity2 activity3';
        width: 80%;
    }
    #timeline.timeline-2{
        grid-template-areas:
        'time1 time2'
        'activity1 activity2';
        width: 55%;
    }
    #timeline::before{
        width: 80%;
        height: 0;
        left: 10%;
        border-top: 1px solid rgb(128, 129, 116);
    }
    #timeline.timeline-2::before{ width: 55%; height: 0; left: 22.5%; }
    #time2{ animation-delay: 0.3s; }
    #time3{ animation-delay: 0.6s; }
    .activity{ writing-mode: vertical-lr; align-self: start; }
}

@media screen and (min-width: 600px) {
    #invite h2{ font-size: 30px; }
}

/* ---------- Mobile: tighter letter-spacing + responsive widths so
   Chinese text has room to breathe instead of wrapping 1-2 chars/line ---------- */
@media screen and (max-width: 600px) {
    body{ letter-spacing: 1px; }

    .intro-box{
        width: 82vw;
        max-width: 280px;
        padding: 90px 24px 40px 24px;
        margin: 130px 16px;
    }

    #invite div{ width: 88vw; max-width: 320px; }
    #invite p{ letter-spacing: 2px; padding: 30px 12px 0 12px; }

    #timeline{ width: 220px; }

    .activity{ letter-spacing: 2px; }

    #traffic-content{ padding: 20px 24px; letter-spacing: 1px; }
    .guide{ padding-right: 10px; }

    .dresscode-box.active{ width: 90vw; max-width: 320px; }
    .dresscode-note{ letter-spacing: 1px; padding: 0 20px 24px 20px; }

    #RSVParea{ max-width: 90vw; }

    input[type=submit]{ letter-spacing: 3px; }
}
