@font-face {
    font-family: "Runethia";
    src: url("/font/Runethia.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Mardoto";
    src: url("/font/Mardoto-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Charm";
    src: url("/font/Charm-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    background: #111;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.invite-wrap {
    height: 100svh;
    width: calc(100svh * 366 / 528);

    max-width: 100vw;
    max-height: 100svh;
}

.envelope {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f5f0e8;
}

.inner-content {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transform: scale(.96);
    transition: opacity .7s ease .8s, transform .7s ease .8s;
    padding: 24px 22px 0 22px;
    background: #f5f0e8;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
}

.envelope.open .inner-content {
    pointer-events: auto;
}

.inner-content::before {
    content: "";
    position: absolute;
    inset: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(0,0,0,.035), transparent 18%),
        radial-gradient(circle at 80% 35%, rgba(0,0,0,.025), transparent 20%),
        repeating-linear-gradient(
            90deg,
            rgba(0,0,0,.018) 0,
            rgba(0,0,0,.018) 1px,
            transparent 1px,
            transparent 5px
        );
    opacity: .45;
    pointer-events: none;
    z-index: 1;
}

.inner-content > * {
    position: relative;
    z-index: 2;
}

.inside-photo {
    width: 100%;
    display: block;
}

/* MUSIC */
.music-player {
    margin-top: 14px;
}

.player-controls {
    width: 62%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-btn {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    position: relative;
}
.music-img {
    width: 20px;
    height: 19px;
}
.music-img-r {
    width: 20px;
    height: 19px;
    margin-right: 20px;
}
.music-img-l {
    width: 20px;
    height: 19px;
    margin-left: 20px;
}
.prev,
.next {
    width: 13px;
    height: 13px;
}

.prev::before,
.prev::after,
.next::before,
.next::after {
    content: "";
    position: absolute;
    top: 3px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.prev::before {
    left: 1px;
    border-right: 5px solid #000;
}

.prev::after {
    left: 7px;
    border-right: 5px solid #000;
}

.next::before {
    left: 1px;
    border-left: 5px solid #000;
}

.next::after {
    left: 7px;
    border-left: 5px solid #000;
}

.play {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #000;
    margin-inline: 20px;
}

.play::before {
    content: "";
    position: absolute;
    left: 24px;
    top: 21px;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid #fff;
}

.play.is-playing::before {
    left: 21px;
    top: 21px;
    width: 4px;
    height: 15px;
    border: 0;
    background: #fff;
    box-shadow: 8px 0 0 #fff;
}

.player-progress {
    position: relative;
    margin: 15px auto 0;
    width: 62%;
    height: 1px;
    background: #111;
    cursor: pointer;
}

.progress-line {
    width: 0%;
    height: 100%;
    background: #111;
}

.player-progress span {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #000;
}

/* DATE SECTION */
.date-section {
    margin: 28px 0 0;
    background: #7E091C;
    color: #fff;
    padding: 34px 34px 36px;
    text-align: center;
    font-family: "Mardoto", sans-serif;
}

.invite-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .3px;
    margin-bottom: 13px;
}

.invite-text {
    font-size: 14px;
    line-height: 1.50;
    font-weight: 400;
}

.date-decor {
    width: 52px;
    height: 1px;
    background: rgba(255,255,255,.85);
    margin: 22px auto;
}

.event-date {
    display: grid;
    grid-template-columns: 70px auto 70px;
    align-items: center;
    justify-content: center;
    column-gap: 13px;
    margin-top: 2px;
    margin-bottom: 4px;
}

.date-number {
    font-family: "Charm", serif;
    font-size: 60px;
    position: relative;
    top: -1px;
    line-height: 1;
    font-weight: 400;
}

.date-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.date-side span {
    display: block;
    width: 64px;
    height: 1px;
    background: rgba(255,255,255,.78);
}

/* .date-side p {
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
    white-space: nowrap;
} */

.countdown-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .35px;
    margin-bottom: 17px;
    margin-right: 3px;
}

.countdown {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 13px;
    margin-right: 20px;
}

.countdown div {
    width: 48px;
    text-align: center;
}

.countdown strong {
    display: block;
    font-size: 32px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: 4px;
    font-variant-numeric: tabular-nums;
}

.countdown div:not(:last-child) strong::after {
    content: ":";
    position: relative;
    left: 8px;
}

.countdown span {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    line-height: 1;
    font-weight: 400;
    text-align: center;
}

.calendar {
    width: 82%;
    margin: 0 auto;
}

.calendar-week,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-week {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 7px;
}

.calendar-line {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,.85);
    margin-bottom: 7px;
}

.calendar-days {
    row-gap: 4px;
    font-size: 13px;
    font-weight: 700;
}

.calendar-days span {
    position: relative;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.heart-day {
    position: relative;
    width: 32px;
    height: 28px;
    margin: 0 auto;
    color: #fff;
    z-index: 1;
}

.heart-day img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.heart-day span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* LOCATION SECTION */
.location-section {
    margin: 0 -22px;
    padding: 28px 22px 0;
    text-align: center;
    color: #2b2b2b;
}

.cheers-img {
    display: block;
    width: 64px;
    margin: 0 auto 16px;
}

.location-title {
    font-size: 16px;
    line-height: 1.3;
    margin-bottom: 11px;
}

.location-line {
    width: 150px;
    height: 1px;
    background: rgba(0,0,0,.35);
    margin: 0 auto 12px;
}

.event-time {
    font-family: "Mardoto";
    font-size: 18px;
    line-height: 1;
    margin-bottom: 13px;
}

.event-place {
    font-size: 16px;
    line-height: 1.25;
    margin-bottom: 9px;
}

.event-address {
    font-size: 16px;
    line-height: 1.25;
    margin-bottom: 17px;
}
.event-time-address {
    font-family: "Mardoto";
    font-size: 15px;
}

.route-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 28px;
    padding: 15px 10px;
    border: 1px solid #7E091C;
    border-radius: 0;
    color: #7E091C;
    text-decoration: none;
    font-size: 15px;
    line-height: 1;
    background: transparent;
}

.photo-grid {
    margin: 28px -22px 0;
    /* display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0; */
}

.photo-grid img {
    display: block;
    width: 100%;
    /* height: 320px; */
    object-fit: cover;
}

.love-section {
    margin: 0 -22px -24px;
    background: #7E091C;
    overflow: hidden;
    padding: 45px;
}

.love-sign {
    display: block;
    width: 130%;
    max-width: none;
    margin-left: -10%;
    height: auto;
}

/* COVER PARTS */
.cover {
    position: absolute;
    left: 0;
    width: 100%;
    height: calc(50% + 2px);
    overflow: hidden;
    z-index: 5;
    transition: transform 1.2s cubic-bezier(.22,.9,.28,1);
}

.cover img {
    position: absolute;
    left: 0;
    width: 100%;
    height: 200%;
    object-fit: cover;
    height: 199.3%;
}

.cover-top {
    top: -1px;
}

.cover-top img {
    top: 0;
}

.cover-bottom {
    bottom: -1px;
}

.cover-bottom img {
    bottom: 0;
}

.names {
    position: absolute;
    top: 13.6%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: #fff;
    text-align: center;
    font-family: "Runethia", cursive;
    font-size: clamp(70px, 15.3vw, 70px);
    line-height: .9;
    transition: opacity .35s ease;
}

.names span {
    display: block;
    margin: 20px 0;
    font-family: "Monsieur La Doulaise", cursive;
    font-size: clamp(24px, 8.7vw, 32px);
    line-height: 1;

    -webkit-text-stroke: 0.5px #fff;
}

.seal {
    position: absolute;
    left: 50%;
    top: 57%;
    transform: translateX(-50%);
    z-index: 20;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: opacity .35s ease;
}

.seal img {
    display: block;
    width: 120px;
    height: auto;
}

.date {
    position: absolute;
    left: 50%;
    bottom: 11%;
    transform: translateX(-50%);
    z-index: 10;
    color: #fff;
    font-family: "Mardoto", sans-serif;
    font-size: clamp(19px, 4.4vw, 19px);
    font-weight: 400;
    transition: opacity .35s ease;
}

/* OPEN */
.envelope.open .cover-top {
    transform: translateY(-100%);
}

.envelope.open .cover-bottom {
    transform: translateY(100%);
}

.envelope.open .inner-content {
    opacity: 1;
    transform: scale(1);
}

.envelope.open .names,
.envelope.open .seal,
.envelope.open .date {
    opacity: 0;
    pointer-events: none;
}

.inner-content {
    scrollbar-width: thin;
    scrollbar-color: #7E091C transparent;
}

/* Chrome / Safari */
.inner-content::-webkit-scrollbar {
    width: 6px;
}

.inner-content::-webkit-scrollbar-track {
    background: transparent;
}

.inner-content::-webkit-scrollbar-thumb {
    background: #7E091C;
    border-radius: 20px;
}

.inner-content::-webkit-scrollbar-thumb:hover {
    background: #7E091C;
}

/* .inner-content {
    scrollbar-width: none;
}

.inner-content::-webkit-scrollbar {
    display: none;
} */
#days {
    margin-left: 6px;
}
#hours {
    margin-left: 8px;
}
#minutes {
    margin-left: 14px;
}
#seconds {
    margin-left: 20px;
}
.timerO {
    margin-left: 10px;
}
.timerT {
    margin-left: 19px;
}
.timerTh {
    margin-left: 28px;
}
.date-year {
    font-size: 20px;
}
.date-month {
    font-size: 18px;
}
.play-music {
    width: 60px;
    height: 60px;
    cursor: pointer;
}