/* cyrillic-ext */

/* cyrillic */

/* latin-ext */

/* latin */

/* cyrillic-ext */

/* cyrillic */

/* latin-ext */

/* latin */

/* cyrillic-ext */
@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/imported-original-fonts/d289bc13a66cf739a0ca.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/imported-original-fonts/0f84b91584bab70a37be.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/imported-original-fonts/17016a855320df6c937e.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* vietnamese */
@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/imported-original-fonts/4755b062ab61bea1990c.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/imported-original-fonts/3fdf313774b1e716a691.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/imported-original-fonts/d7c6026920e8a9c670ef.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/imported-original-fonts/95b9ea830580b57efca1.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/imported-original-fonts/1e8edb2fc100b7f74bc3.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/imported-original-fonts/6d0a674525fee3ddd769.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/imported-original-fonts/dbc85b0dfbaaa3152a6b.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/imported-original-fonts/4c2d4a14f23a8ed50857.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/imported-original-fonts/a9d11b3ffe7aa5371e2b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/imported-original-fonts/e3237528af752eed937e.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/imported-original-fonts/95b9ea830580b57efca1.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/imported-original-fonts/1e8edb2fc100b7f74bc3.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/imported-original-fonts/6d0a674525fee3ddd769.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/imported-original-fonts/dbc85b0dfbaaa3152a6b.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/imported-original-fonts/4c2d4a14f23a8ed50857.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/imported-original-fonts/a9d11b3ffe7aa5371e2b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/imported-original-fonts/e3237528af752eed937e.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/imported-original-fonts/95b9ea830580b57efca1.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/imported-original-fonts/1e8edb2fc100b7f74bc3.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/imported-original-fonts/6d0a674525fee3ddd769.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/imported-original-fonts/dbc85b0dfbaaa3152a6b.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/imported-original-fonts/4c2d4a14f23a8ed50857.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/imported-original-fonts/a9d11b3ffe7aa5371e2b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/imported-original-fonts/e3237528af752eed937e.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/imported-original-fonts/a13031654d667f8404de.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/imported-original-fonts/3effa9311007213de22a.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/imported-original-fonts/891feccf9363d0f48e94.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/imported-original-fonts/a50b218eceed33607e8a.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: url(/assets/imported-original-fonts/a13031654d667f8404de.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: url(/assets/imported-original-fonts/3effa9311007213de22a.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: url(/assets/imported-original-fonts/891feccf9363d0f48e94.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: url(/assets/imported-original-fonts/a50b218eceed33607e8a.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/imported-original-fonts/edff4874961e8711e818.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/imported-original-fonts/2f08df1456fc9116ea51.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/imported-original-fonts/3cb6b7b1979e5dd25a9b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/imported-original-fonts/363014d7c907501d51b5.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/imported-original-fonts/edff4874961e8711e818.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/imported-original-fonts/2f08df1456fc9116ea51.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/imported-original-fonts/3cb6b7b1979e5dd25a9b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/imported-original-fonts/363014d7c907501d51b5.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */

/* latin */

@font-face {
  font-family: 'Mali';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/imported-original-fonts/mali-regular-vi-6d4690d72866.woff2') format('woff2');
}
@font-face {
  font-family: 'Mali';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/imported-original-fonts/mali-bold-vi-6d9b0e0bb7e9.woff2') format('woff2');
}

:root {
    --theme-color: #d96c86;
    --theme-rgb: 217, 108, 134;
    --theme-soft: #f8d9e1;
    --theme-wash: #fff3f6;
    --primary-red: var(--theme-color);
    --bg-cream: #fefaf1;
    --text-black: #2d2d2d;
    --envelope-color: var(--theme-color);
    --envelope-shade: var(--theme-color);
    --handwriting-font: 'Mali', cursive;
    --bold-font: 'Playfair Display', serif;
    --elegant-font: 'Great Vibes', cursive;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    position: relative;
    background: url('/assets/bon-hop-yeu-thuong/fourbox/paper.png') no-repeat center center fixed;
    background-size: cover;
    font-family: 'Mali', cursive;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(254, 250, 241, 0.4);
    z-index: -1;
}

/* Warnings */
.warning-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/assets/bon-hop-yeu-thuong/fourbox/paper.png') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: all 0.5s ease;
    padding: 20px;
    overflow: hidden;
    isolation: isolate;
}

.warning-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(254, 250, 241, 0.42);
    z-index: -2;
}

.warning-screen::after {
    content: '';
    position: absolute;
    inset: 24px;
    border: 1px solid rgba(var(--theme-rgb), 0.18);
    box-shadow: inset 0 0 60px rgba(var(--theme-rgb), 0.16);
    pointer-events: none;
    z-index: -1;
}

.warning-box {
    text-align: center;
    padding: 2rem 1.2rem;
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    position: relative;
    z-index: 1;
}

.warning-box .bold-text,
.warning-box .question {
    text-shadow:
        -2px -2px 0 #fff,
        2px -2px 0 #fff,
        -2px 2px 0 #fff,
        2px 2px 0 #fff,
        -3px 0 0 #fff,
        3px 0 0 #fff,
        0 3px 0 #fff,
        0 -3px 0 #fff,
        0 0 8px rgba(255, 255, 255, 0.8);
}

.warning-box .bold-text {
    width: 100%;
    max-width: 100%;
    font-size: 1.8rem !important;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
}

.theme-picker {
    width: min(100%, 330px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
}

.theme-picker[hidden],
.music-link-picker[hidden],
body.is-fourbox-viewer-embed .theme-picker,
body.is-fourbox-viewer-embed .music-link-picker {
    display: none !important;
}

.theme-picker-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--primary-red);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(4, 42px);
    gap: 0.7rem;
    justify-content: center;
}

.theme-swatch {
    width: 42px;
    height: 42px;
    border: 2px solid rgba(var(--theme-rgb), 0.2);
    border-radius: 50%;
    background: var(--swatch);
    cursor: pointer;
    padding: 0;
    position: relative;
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.62), 0 8px 18px rgba(45, 45, 45, 0.1);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.theme-swatch:hover,
.theme-swatch.is-selected {
    transform: translateY(-2px);
    border-color: var(--primary-red);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.68), 0 10px 22px rgba(var(--theme-rgb), 0.24);
}

.theme-swatch.is-selected::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(var(--theme-rgb), 0.72);
}

.music-link-picker {
    width: min(100%, 330px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    font-family: 'Inter', sans-serif;
}

.music-link-label {
    color: var(--primary-red);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    text-align: center;
}

.music-link-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(var(--theme-rgb), 0.38);
    border-radius: 12px;
    background: rgba(255, 253, 248, 0.84);
    color: var(--text-black);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    outline: none;
    padding: 0.75rem 0.9rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 10px 22px rgba(45, 45, 45, 0.08);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.music-link-input::placeholder {
    color: rgba(45, 45, 45, 0.42);
}

.music-link-input:focus {
    border-color: var(--primary-red);
    background: #fffdf8;
    box-shadow: 0 0 0 4px rgba(var(--theme-rgb), 0.14), 0 12px 24px rgba(45, 45, 45, 0.1);
}

.music-link-status {
    color: rgba(45, 45, 45, 0.58);
    font-size: 0.78rem;
    font-weight: 700;
    min-height: 1rem;
    text-align: center;
}

.music-link-status.is-error {
    color: var(--primary-red);
}

.container {
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-out {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    pointer-events: none;
}

.fade-in {
    opacity: 0;
    animation: slideInUp 0.6s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Simple Theme Envelope */
@keyframes dropEnvelope {
    0% {
        transform: scale(0.6) translateY(-60px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.envelope-wrapper {
    margin: 2rem auto;
    position: relative;
    width: min(78vw, 360px);
    aspect-ratio: 360 / 230;
    animation: dropEnvelope 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform-origin: center bottom;
    will-change: transform, opacity;
}

.envelope-wrapper.slide-out {
    animation: envelopeExitLeft 0.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes envelopeExitLeft {
    0% {
        opacity: 1;
        transform: translateX(0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateX(-120vw) rotate(-10deg) scale(0.92);
    }
}

.envelope {
    position: relative;
    width: 100%;
    height: 100%;
    background: transparent;
    cursor: pointer;
    border-radius: 18px;
    transition: transform 0.35s ease, filter 0.35s ease;
    perspective: 900px;
    transform-style: preserve-3d;
    filter: drop-shadow(0 18px 24px rgba(var(--theme-rgb), 0.18));
}

.envelope:hover {
    transform: translateY(-3px) scale(1.015);
}

.simple-envelope-back,
.simple-envelope-back::after,
.simple-envelope-front,
.simple-envelope-front::before,
.simple-envelope-front::after,
.simple-envelope-flap,
.heart-seal,
.dummy-paper {
    position: absolute;
    pointer-events: none;
}

.simple-envelope-back {
    inset: 18% 0 0;
    z-index: 1;
    border-radius: 16px;
    background:
        linear-gradient(180deg, var(--theme-soft) 0%, var(--primary-red) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -10px 22px rgba(45, 45, 45, 0.06);
}

.simple-envelope-back::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 62%);
    z-index: 1;
}

.simple-envelope-back::after {
    content: '';
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    background:
        linear-gradient(145deg, transparent 49.4%, rgba(255, 255, 255, 0.42) 50%, transparent 50.8%),
        linear-gradient(215deg, transparent 49.4%, rgba(255, 255, 255, 0.34) 50%, transparent 50.8%);
    opacity: 0.72;
}

.simple-envelope-front {
    inset: 18% 0 0;
    z-index: 4;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary-red) 82%, #fff 18%), var(--primary-red));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -12px 20px rgba(45, 45, 45, 0.08);
}

.simple-envelope-front::before,
.simple-envelope-front::after {
    content: '';
    bottom: 0;
    width: 54%;
    height: 72%;
    background: color-mix(in srgb, var(--primary-red) 72%, #fff 28%);
    clip-path: polygon(0 0, 100% 100%, 0 100%);
    opacity: 0.42;
}

.simple-envelope-front::before {
    left: 0;
}

.simple-envelope-front::after {
    right: 0;
    transform: scaleX(-1);
}

.simple-envelope-flap {
    left: 0;
    right: 0;
    top: 18%;
    height: 48%;
    z-index: 5;
    transform-origin: 50% 0%;
    transform: rotateX(0deg);
    transition: transform 0.72s cubic-bezier(0.2, 0.72, 0.22, 1), opacity 0.35s ease, z-index 0s linear 0.36s;
    will-change: transform;
}

.simple-envelope-flap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary-red) 88%, #fff 12%), var(--primary-red));
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    border-radius: 16px 16px 6px 6px;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.envelope.open .simple-envelope-flap {
    z-index: 2;
    opacity: 0.86;
    transform: rotateX(168deg);
}

.heart-seal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -35%);
    font-size: clamp(2rem, 8vw, 2.6rem);
    color: var(--primary-red);
    z-index: 35;
    transition: opacity 0.32s ease, transform 0.45s ease;
    filter: drop-shadow(0 4px 6px rgba(var(--theme-rgb), 0.22));
}

.envelope.open .heart-seal {
    opacity: 0;
    transform: translate(-50%, -150%) scale(0.5);
    pointer-events: none;
}

.dummy-paper {
    left: 12%;
    bottom: 20%;
    width: 76%;
    height: 66%;
    background: #fffdf7;
    background-image:
        linear-gradient(90deg, rgba(var(--theme-rgb), 0.14) 0 2px, transparent 2px 100%),
        repeating-linear-gradient(transparent, transparent 18px, rgba(var(--theme-rgb), 0.09) 18px, rgba(var(--theme-rgb), 0.09) 19px);
    z-index: 3;
    border-radius: 9px;
    border: 1px solid rgba(var(--theme-rgb), 0.12);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(28%) scale(0.94);
    opacity: 0.98;
    will-change: transform;
}

.dummy-paper.dispense {
    animation: paperPullFromEnvelope 0.42s cubic-bezier(0.18, 0.86, 0.18, 1) forwards;
    opacity: 1;
}

@keyframes paperPullFromEnvelope {
    0% {
        z-index: 3;
        transform: translateY(28%) scale(0.94) rotate(0deg);
    }

    48% {
        z-index: 3;
        transform: translateY(-90%) scale(1) rotate(-1deg);
    }

    100% {
        z-index: 8;
        transform: translateY(-170vh) scale(1.04) rotate(-5deg);
    }
}

/* Letter Modal Styles */
.letter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.letter-modal.visible {
    display: flex;
}

.modal-content {
    width: min(92vw, 820px);
    height: min(76vh, 660px);
    transition: all 0.5s ease;
    position: relative;
}

.letter-modal.visible .modal-content {
    animation: letterSheetSlideInRight 0.62s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes letterSheetSlideInRight {
    0% {
        opacity: 0;
        transform: translateX(62vw) rotate(2deg) scale(0.96);
    }

    100% {
        opacity: 1;
        transform: translateX(0) rotate(0deg) scale(1);
    }
}

.paper-sheet {
    position: relative;
    width: 100%;
    height: 100%;
    background: #fffdf7;
    padding: clamp(2.8rem, 5vw, 4rem) clamp(1.6rem, 5vw, 4rem) clamp(1.2rem, 3vw, 2rem);
    border-radius: 14px;
    box-shadow: 0 24px 55px rgba(var(--theme-rgb), 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(var(--theme-rgb), 0.16);
    display: flex;
    flex-direction: column;
    text-align: left;
    overflow: hidden;
}

.letter-modal.visible .paper-sheet {
    animation: paperSheetFloat 7s ease-in-out 0.6s infinite;
}

.paper-sheet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(transparent, transparent 29px, rgba(var(--theme-rgb), 0.08) 29px, rgba(var(--theme-rgb), 0.08) 30px);
    pointer-events: none;
    opacity: 0.9;
    border-radius: 14px;
}

.paper-sheet::after {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px dashed rgba(var(--theme-rgb), 0.18);
    border-radius: 10px;
    pointer-events: none;
    z-index: 1;
}

@keyframes paperSheetFloat {
    0%, 100% {
        transform: translateY(0) rotate(-0.25deg);
    }

    50% {
        transform: translateY(-8px) rotate(0.25deg);
    }
}

.letter-date {
    position: absolute;
    top: 2.5rem;
    right: 3rem;
    font-family: var(--handwriting-font);
    font-size: 1.2rem;
    color: var(--primary-red);
    opacity: 0.8;
    z-index: 15;
}

.letter-text {
    font-family: var(--handwriting-font);
    font-size: clamp(1.15rem, 2.5vw, 1.65rem);
    line-height: 1.65;
    color: var(--text-black);
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    overflow-y: scroll;
    flex-grow: 1;
    padding: 0.5rem 15px 0.75rem 0;
    position: relative;
    z-index: 10;
    scroll-behavior: smooth;
    min-height: 0;
}

.letter-greeting {
    font-family: var(--elegant-font) !important;
    font-size: clamp(1.5rem, 8vw, 2.5rem) !important;
    color: var(--primary-red) !important;
    display: block;
    margin-bottom: 2rem;
    line-height: 1;
}

.signature {
    text-align: right !important;
    display: block !important;
    margin-top: 2rem !important;
    font-family: var(--elegant-font) !important;
    font-size: clamp(1.5rem, 7vw, 2.5rem) !important;
    color: var(--primary-red) !important;
    border-top: 1px dashed rgba(var(--theme-rgb), 0.42);
    padding-top: 1.5rem;
}

/* Status GIF in Letter */
.letter-gif-container {
    position: absolute;
    bottom: 25px;
    left: 40px;
    width: clamp(80px, 15vw, 120px);
    z-index: 20;
    pointer-events: none;
}

.letter-gif-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.letter-text::-webkit-scrollbar {
    width: 8px;
}

.letter-text::-webkit-scrollbar-track {
    background: var(--bg-cream);
    border-radius: 10px;
}

.letter-text::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 10px;
    border: 2px solid #fff;
}

/* Letter action buttons */
.letter-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    min-height: 48px;
    margin-top: 0.9rem;
    position: relative;
    z-index: 30;
}

.close-modal-btn,
.skip-letter-btn {
    background: var(--primary-red);
    border: 3px solid var(--primary-red);
    min-height: 44px;
    padding: 0.72rem 2.4rem;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.skip-letter-btn {
    background: #fffdf7;
    color: var(--primary-red);
    border-color: rgba(var(--theme-rgb), 0.55);
}

.close-modal-btn:hover,
.skip-letter-btn:hover {
    background: #fff;
    border-color: var(--primary-red);
    color: var(--primary-red);
    transform: scale(1.05);
}

/* Common UI */
.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    pointer-events: none;
    margin-top: 2rem;
}

.button-group.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.yes-btn,
.no-btn,
.back-btn,
.okay-btn {
    background: var(--bg-cream);
    border: 3px solid var(--primary-red);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--primary-red);
    cursor: pointer;
    transition: all 0.3s ease;
    animation: floatingButtons 4s ease-in-out infinite;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.back-btn {
    position: fixed;
    top: calc(env(safe-area-inset-top) + clamp(0.85rem, 2vw, 1.25rem));
    left: calc(env(safe-area-inset-left) + clamp(0.85rem, 2vw, 1.25rem));
    right: auto;
    z-index: 1500;
    margin: 0;
    padding: 0.72rem 1.25rem;
    animation: none;
    background: rgba(255, 253, 248, 0.9);
    border: 1px solid rgba(var(--theme-rgb), 0.45);
    box-shadow: 0 14px 30px rgba(45, 45, 45, 0.1);
    backdrop-filter: blur(12px);
}

.fourbox-create-own-btn {
    left: auto;
    right: calc(env(safe-area-inset-right) + clamp(0.85rem, 2vw, 1.25rem));
    white-space: nowrap;
}

@media (max-width: 768px), (max-height: 480px) {
  body:is(.is-published-fourbox, .is-fourbox-viewer-embed) .back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 0.75rem;
  }
  .back-btn svg { width: 20px; height: 20px; flex: 0 0 20px; }
  body:is(.is-published-fourbox, .is-fourbox-viewer-embed) .button-group,
  body:is(.is-published-fourbox, .is-fourbox-viewer-embed) .music-controls,
  body:is(.is-published-fourbox, .is-fourbox-viewer-embed) .music-utility-row { flex-wrap: wrap; }
  body:is(.is-published-fourbox, .is-fourbox-viewer-embed) :is(.yes-btn, .no-btn, .okay-btn, .close-modal-btn, .skip-letter-btn) {
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
  }
  body:is(.is-published-fourbox, .is-fourbox-viewer-embed) :is(.track-action-btn, .deck-fx-btn, .ctrl-btn) {
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
  }
  body:is(.is-published-fourbox, .is-fourbox-viewer-embed) .warning-screen { overflow-y: auto; }
}

.back-btn[hidden] {
    display: none !important;
}

@media (max-width: 520px) {
    .fourbox-create-own-btn {
        padding-inline: 1rem;
        font-size: 0.72rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
}

.yes-btn:hover,
.no-btn:hover,
.back-btn:hover,
.okay-btn:hover {
    background: var(--primary-red);
    color: #fff;
    box-shadow: 0 8px 15px rgba(var(--theme-rgb), 0.3);
}

@keyframes floatingButtons {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes foldUpAndFade {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
}

.fade-up-out {
    animation: foldUpAndFade 0.5s forwards cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.bold-text {
    font-family: var(--bold-font);
    font-weight: 900;
    font-size: clamp(2.25rem, 7vw, 3.5rem);
    color: var(--primary-red);
    font-style: italic;
    width: 100%;
    max-width: min(100%, 920px);
    margin-inline: auto;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.08;
}

.greeting {
    width: 100%;
    font-size: 3.5rem;
    color: var(--text-black);
    font-family: var(--handwriting-font);
    text-align: center;
}

.question {
    width: 100%;
    font-family: var(--handwriting-font);
    font-size: 1.5rem;
    color: #555;
    margin-bottom: 2rem;
    text-align: center;
}

@keyframes letterFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(var(--tx, 0px), var(--ty, -6px)) rotate(var(--rr, 0deg));
    }
}

@keyframes letterFloatMinimal {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(calc(var(--tx, 0px) * 0.3), calc(var(--ty, -6px) * 0.3)) rotate(calc(var(--rr, 0deg) * 0.3));
    }
}

.float-char {
    display: inline-block;
    animation: letterFloat 3s ease-in-out infinite;
}

.question .float-char {
    animation-name: letterFloatMinimal;
}

.typing-title {
    position: relative;
    display: block;
    width: 100%;
    max-width: min(100%, 920px);
    margin-inline: auto;
    text-align: center;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
}

.typing-title.is-typing::after {
    content: '';
    display: inline-block;
    width: 0.08em;
    height: 0.82em;
    margin-left: 0.12em;
    border-radius: 999px;
    background: currentColor;
    vertical-align: -0.05em;
    animation: titleCursorBlink 0.72s steps(2, end) infinite;
}

.title-char-wrap,
.title-space {
    display: inline-block;
}

.title-word {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
}

.title-space {
    width: 0.32em;
}

.title-char-wrap {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(0.28em) scale(0.96);
    animation: titleCharIn 0.36s cubic-bezier(0.2, 0.82, 0.28, 1.2) forwards;
}

.title-char {
    display: inline-block;
    animation: titleLetterDrift 3.6s ease-in-out infinite;
    animation-delay: calc(var(--char-index, 0) * -0.08s);
}

/*
 * iOS WebKit can crop italic web-font strokes when each glyph is promoted to
 * its own filtered/transformed layer. The JS typewriter already reveals the
 * letters one at a time, so iOS keeps that effect while using a larger,
 * non-composited paint box for every character.
 */
@supports (-webkit-touch-callout: none) {
    .title-word,
    .title-char-wrap,
    .title-char {
        overflow: visible;
    }

    .title-char-wrap {
        opacity: 1;
        filter: none;
        transform: none;
        animation: none;
        padding: 0.16em 0.12em 0.22em;
        margin: -0.16em -0.12em -0.22em;
    }

    .title-char {
        transform: none;
        animation: none;
        -webkit-font-smoothing: antialiased;
    }
}

.music-title .title-char {
    animation-duration: 4.2s;
}

@keyframes titleCharIn {
    0% {
        opacity: 0;
        filter: blur(2px);
        transform: translateY(0.28em) scale(0.96);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0) scale(1);
    }
}

@keyframes titleLetterDrift {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(var(--float-y, -3px)) rotate(var(--float-r, 0deg));
    }
}

@keyframes titleCursorBlink {
    0%,
    45% {
        opacity: 0.75;
    }

    46%,
    100% {
        opacity: 0;
    }
}

.no-response-view {
    width: min(100%, 760px);
    min-height: min(70vh, 620px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.25rem;
}

.no-response-title {
    width: min(100%, 680px);
    max-width: calc(100vw - 2rem);
    margin: 0 auto;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
    line-height: 1.08;
    font-size: clamp(2rem, 8vw, 3.5rem) !important;
}

.no-response-view .okay-btn {
    margin-top: 0.5rem;
}

/* GIF FIX */
.gift-container {
    width: 250px;
    height: 250px;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
}

@keyframes floatingGif {

    0%,
    100% {
        transform: translateY(0) rotate(-1deg);
    }

    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

.gift-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: floatingGif 5s ease-in-out infinite;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, clamp(175px, 15vw, 210px));
    gap: 4rem 2.4rem;
    justify-content: center;
    margin: 3rem auto 0;
}

.category-card {
    background: #fff;
    border: 3px solid var(--primary-red);
    border-radius: 30px;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0.8) translateY(30px);
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.category-card:nth-child(1) {
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0s forwards, floatingFrame 8s ease-in-out 0.6s infinite;
}

.category-card:nth-child(2) {
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards, floatingFrame 8s ease-in-out 1.1s infinite;
}

.category-card:nth-child(3) {
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.0s forwards, floatingFrame 8s ease-in-out 1.6s infinite;
}

.category-card:nth-child(4) {
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s forwards, floatingFrame 8s ease-in-out 2.1s infinite;
}

@keyframes floatingFrame {

    0%,
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0deg);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    25% {
        opacity: 1;
        transform: scale(1) translateY(-5px) rotate(1.5deg);
        box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
    }

    75% {
        opacity: 1;
        transform: scale(1) translateY(-5px) rotate(-1.5deg);
        box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
    }
}

.category-card::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--text-black);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.category-card:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.category-card:hover {
    transform: scale(1.05) translateY(-5px);
    background: color-mix(in srgb, var(--primary-red) 16%, #fff 84%);
}

/* Category Picture Size Fix */
@keyframes floatingCards {

    0%,
    100% {
        transform: translateY(0) rotate(-1deg);
    }

    50% {
        transform: translateY(-8px) rotate(1deg);
    }
}

.icon-box {
    animation: floatingCards 5s ease-in-out infinite;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-box img {
    width: 74%;
    height: 74%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.05)) grayscale(0%);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-card:hover .icon-box img {
    transform: scale(1.15);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15)) grayscale(100%);
}

.category-card[data-category="flowers"] .icon-box {
    display: grid;
    place-items: center;
}

.category-card[data-category="flowers"] .icon-box img {
    object-position: center;
}

/* Music Player Styles */
.music-view,
.big-flower-view,
.letter-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
}

.container.music-mode {
    max-width: min(1120px, 100%);
    padding: clamp(1rem, 2.6vw, 2rem);
}

.music-view {
    width: min(100%, 1040px);
    min-height: calc(100svh - 4rem);
    gap: clamp(1rem, 2vw, 1.5rem);
    padding: clamp(3.75rem, 5.8vw, 4.75rem) clamp(0.5rem, 2vw, 1.5rem) clamp(2rem, 4vw, 3rem);
    isolation: isolate;
    overflow: hidden;
}

.music-view::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(45, 45, 45, 0.08), rgba(255, 255, 255, 0) 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(254, 250, 241, 0.92)),
        repeating-linear-gradient(90deg, rgba(45, 45, 45, 0.045) 0 1px, transparent 1px 52px),
        repeating-linear-gradient(0deg, rgba(var(--theme-rgb), 0.035) 0 1px, transparent 1px 52px);
}

.music-view::after {
    content: '';
    position: absolute;
    inset: clamp(0.8rem, 2vw, 1.8rem);
    border: 1px solid rgba(45, 45, 45, 0.08);
    border-radius: 28px;
    z-index: 0;
    pointer-events: none;
}

.music-view > * {
    position: relative;
    z-index: 1;
}

.music-header {
    color: var(--primary-red);
    font-size: clamp(2rem, 4.5vw, 3.45rem) !important;
    line-height: 1;
    margin: 0 0 clamp(0.2rem, 0.8vw, 0.55rem) !important;
    max-width: min(92vw, 900px);
    white-space: normal;
    text-shadow: 0 12px 32px rgba(45, 45, 45, 0.12);
}

.music-player-card {
    background: rgba(255, 253, 248, 0.92);
    border: 1px solid rgba(var(--theme-rgb), 0.2);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 22px 60px rgba(45, 45, 45, 0.14);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: min(100%, 380px);
    margin: 0 auto;
    backdrop-filter: blur(16px);
}

.tv-wrapper.massive-tv {
    max-width: 780px;
    width: min(100%, 780px);
    margin: 0 auto clamp(0.25rem, 1vw, 0.75rem);
    padding: clamp(0.55rem, 1.4vw, 0.95rem);
    position: relative;
    z-index: 1;
    background: linear-gradient(145deg, #303033, #151518);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(29, 29, 31, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.tv-wrapper.massive-tv::after {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -14px;
    height: 20px;
    border-radius: 999px;
    background: rgba(45, 45, 45, 0.18);
    filter: blur(10px);
    z-index: -1;
}

.music-player-card.compact-layout {
    flex-direction: row;
    max-width: 780px;
    width: min(100%, 780px);
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1rem, 2.6vw, 1.65rem);
    align-items: center;
    position: relative;
    z-index: 1;
    margin-left: auto;
    margin-right: auto;
}

.music-left-info {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
    flex: 1;
    min-width: 0;
}

.vinyl-record {
    width: clamp(150px, 18vw, 190px);
    height: clamp(150px, 18vw, 190px);
    background:
        radial-gradient(circle at center, #fefaf1 0 8%, transparent 8.5%),
        radial-gradient(circle at center, transparent 0 24%, rgba(255, 255, 255, 0.08) 24.5% 25.5%, transparent 26% 41%, rgba(255, 255, 255, 0.06) 41.5% 42.5%, transparent 43%),
        linear-gradient(135deg, #2f3033, #101114 62%, #26272a);
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    box-shadow: 0 18px 34px rgba(29, 29, 31, 0.24), inset 0 0 0 10px rgba(0, 0, 0, 0.28), inset 0 0 34px rgba(255, 255, 255, 0.06);
}

.vinyl-record::before,
.vinyl-record::after {
    content: '';
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.09);
    pointer-events: none;
}

.vinyl-record::after {
    inset: 23%;
    border-color: rgba(255, 255, 255, 0.13);
}

.album-art {
    width: 43%;
    height: 43%;
    border-radius: 50%;
    background: #fff;
    padding: 0;
    object-fit: cover;
    z-index: 2;
    border: 4px solid #fefaf1;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.vinyl-hole {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fefaf1;
    border-radius: 50%;
    z-index: 3;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
}

@keyframes spinRecord {
    100% {
        transform: rotate(360deg);
    }
}

.vinyl-record.spinning {
    will-change: transform;
}

.music-info {
    text-align: left;
    width: 100%;
}

.music-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    color: var(--primary-red);
    font-size: clamp(1.35rem, 3vw, 2.15rem);
    line-height: 1.05;
    margin-bottom: 0.35rem;
    overflow-wrap: anywhere;
}

.music-artist {
    font-family: 'Inter', sans-serif;
    color: rgba(45, 45, 45, 0.64);
    font-size: 0.95rem;
    font-weight: 700;
}

/* TV Styling */
.tv-wrapper {
    background: var(--envelope-color);
    padding: 15px 25px 30px 15px;
    border-radius: 20px;
    border: 3px solid var(--primary-red);
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), inset 0 0 10px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.tv-wrapper.massive-tv .tv-antenna,
.tv-wrapper.massive-tv .tv-knobs {
    display: none;
}

.tv-antenna {
    position: absolute;
    top: -25px;
    left: 40px;
    width: 60px;
    height: 40px;
    border-top: 3px solid #777;
    border-left: 3px solid #777;
    transform: skewX(-20deg);
}

.tv-screen {
    background: #050506;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.7), 0 14px 30px rgba(0, 0, 0, 0.28);
}

.tv-knobs {
    position: absolute;
    right: 8px;
    top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.knob {
    width: 12px;
    height: 12px;
    background: #444;
    border-radius: 50%;
    border: 2px solid #222;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Progress Bar */
.progress-container {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    max-width: none;
    margin-top: -0.1rem;
}

.progress-container span {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(45, 45, 45, 0.52);
    min-width: 2.5rem;
    font-variant-numeric: tabular-nums;
}

.progress-bar-bg {
    flex-grow: 1;
    height: 9px;
    background: rgba(45, 45, 45, 0.1);
    border-radius: 999px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(45, 45, 45, 0.12);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-red);
    border-radius: 999px;
    transition: width 0.1s linear;
}

/* Controls */
.music-controls {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 0.15rem;
}

.ctrl-btn {
    background: #fffdf8;
    border: 1px solid rgba(var(--theme-rgb), 0.28);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    color: var(--primary-red);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 12px 24px rgba(45, 45, 45, 0.12);
}

.ctrl-btn:hover {
    background: var(--primary-red);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(var(--theme-rgb), 0.28);
}

#play-pause-btn {
    width: 60px;
    height: 60px;
    background: var(--primary-red);
    color: #fff;
}

#play-pause-btn:hover {
    background: var(--primary-red);
    transform: translateY(-2px) scale(1.03);
}

@media (max-width: 768px) {
    .container.music-mode {
        max-width: 100%;
        padding: 1rem;
    }

    .music-view {
        min-height: auto;
        padding: 4.5rem 0 2rem;
        gap: 1rem;
    }

    .music-view::after {
        inset: 0.75rem;
        border-radius: 22px;
    }

    .music-header {
        max-width: calc(100vw - 2rem);
        font-size: clamp(2rem, 10vw, 3rem) !important;
    }

    .tv-wrapper.massive-tv {
        width: min(100%, 560px);
        padding: 0.5rem;
        border-radius: 20px;
    }

    .tv-screen {
        border-radius: 14px;
    }

    .music-player-card.compact-layout {
        flex-direction: column;
        width: min(100%, 430px);
        gap: 1.15rem;
        padding: 1.15rem;
        text-align: center;
        align-items: center;
    }

    .music-left-info {
        width: 100%;
        align-items: stretch;
        text-align: center;
    }

    .music-info {
        text-align: center;
    }

    .progress-container {
        max-width: 100%;
    }

    .modal-content {
        width: 94vw;
        height: 72svh;
    }

    .envelope-wrapper {
        width: min(84vw, 330px);
        margin: 1.25rem auto;
    }
}

@media (max-width: 480px) {
    .bold-text {
        font-size: 2.2rem !important;
    }

    .music-view {
        padding-top: 4.25rem;
    }

    .music-player-card.compact-layout {
        border-radius: 20px;
    }

    .vinyl-record {
        width: 132px;
        height: 132px;
    }

    .music-title {
        font-size: 1.35rem;
    }

    .music-controls {
        justify-content: center;
        gap: 0.75rem;
    }

    .ctrl-btn {
        width: 44px;
        height: 44px;
    }

    #play-pause-btn {
        width: 56px;
        height: 56px;
    }

    .no-response-view {
        min-height: 68vh;
        gap: 1rem;
        padding: 0 0.25rem;
    }

    .no-response-view .gift-container {
        width: min(68vw, 220px);
        height: min(68vw, 220px);
        margin-bottom: 0.25rem;
    }

    .no-response-title {
        font-size: clamp(1.75rem, 10vw, 2.4rem) !important;
        max-width: calc(100vw - 1.5rem);
    }

    .no-response-view .okay-btn {
        width: min(100%, 260px);
        padding: 0.8rem 1.25rem;
    }

    .greeting {
        font-size: 2.5rem;
    }

    .modal-content {
        width: 94vw;
        height: 68svh;
    }

    .paper-sheet {
        padding: 3.4rem 1.2rem 1rem;
        border-radius: 12px;
    }

    .letter-date {
        top: 1.2rem;
        right: 1.5rem;
        font-size: 0.9rem;
    }

    .letter-text {
        font-size: 1.15rem;
        line-height: 1.55;
        padding-right: 10px;
    }

    .letter-greeting {
        font-size: 1.5rem !important;
        margin-bottom: 1.2rem;
    }

    .signature {
        font-size: 2rem !important;
        margin-top: 1.2rem !important;
        padding-top: 1rem;
    }

    .letter-gif-container {
        bottom: 15px;
        left: 15px;
        width: 54px;
        opacity: 0.8;
    }

    .letter-actions {
        min-height: 42px;
        margin-top: 0.65rem;
    }

    .close-modal-btn,
    .skip-letter-btn {
        min-height: 40px;
        padding: 0.62rem 1.35rem;
        font-size: 0.86rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 130px);
        gap: 2.8rem 1rem;
    }

    .envelope-wrapper {
        width: min(82vw, 300px);
        margin: 1rem auto;
    }
}

/* Music Turntable Layout */
.container.music-mode {
    max-width: 520px;
    padding: clamp(0.75rem, 2.5vw, 1.25rem);
}

.music-view {
    width: min(100%, 430px);
    min-height: calc(100svh - 2rem);
    gap: 0;
    justify-content: flex-start;
    padding: calc(env(safe-area-inset-top) + 3.7rem) 0 calc(env(safe-area-inset-bottom) + 1rem);
    overflow: visible;
    isolation: isolate;
}

.music-view::before,
.music-view::after {
    display: none;
}

.heart-rain-layer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    pointer-events: none;
    overflow: hidden;
    color: var(--theme-color);
}

.falling-heart {
    position: absolute;
    left: var(--heart-left);
    top: var(--heart-top);
    width: var(--heart-size);
    height: var(--heart-size);
    color: var(--theme-color);
    opacity: 0;
    transform: translate(-50%, 0) rotate(var(--heart-rotate)) scale(0.72);
    animation: heartFall var(--heart-duration) cubic-bezier(0.2, 0.72, 0.22, 1) var(--heart-delay) forwards;
}

.falling-heart svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
    filter: drop-shadow(0 4px 6px rgba(45, 45, 45, 0.14));
}

@keyframes heartFall {
    0% {
        opacity: 0;
        transform: translate(-50%, -8px) rotate(var(--heart-rotate)) scale(0.65);
    }

    14% {
        opacity: 0.95;
    }

    72% {
        opacity: 0.86;
    }

    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--heart-drift)), calc(100vh + 160px)) rotate(calc(var(--heart-rotate) + var(--heart-spin))) scale(0.98);
    }
}

.record-player-shell,
.player-deck {
    width: 100%;
    position: relative;
    z-index: 1;
}

.turntable-card {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: visible;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(45, 45, 45, 0.06)),
        linear-gradient(135deg, #d7d9d8, #eef0ee 46%, #c6c9c8);
    border: 1px solid rgba(45, 45, 45, 0.08);
    box-shadow: 0 24px 46px rgba(45, 45, 45, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    isolation: isolate;
}

.turntable-card::before {
    content: '';
    position: absolute;
    inset: 5.6%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 45, 45, 0.16), rgba(45, 45, 45, 0.06) 52%, transparent 68%);
    filter: blur(4px);
    transform: translateY(2%);
}

.turntable-brand {
    position: absolute;
    top: 7%;
    left: 7%;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(45, 45, 45, 0.26);
    border-radius: 50%;
    z-index: 5;
}

.turntable-brand::before,
.turntable-brand::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    background: rgba(45, 45, 45, 0.26);
}

.turntable-brand::before {
    width: 9px;
    height: 2px;
    left: 8px;
    top: 12px;
    transform: rotate(42deg);
}

.turntable-brand::after {
    width: 6px;
    height: 6px;
    left: 5px;
    top: 5px;
    background: transparent;
    border: 2px solid rgba(45, 45, 45, 0.18);
}

.turntable-body {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 3;
}

.record-shadow {
    position: absolute;
    width: 82%;
    height: 82%;
    border-radius: 50%;
    background: rgba(45, 45, 45, 0.18);
    filter: blur(9px);
    transform: translateY(3%);
}

.turntable-card .vinyl-record {
    width: 78%;
    height: 78%;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.9) 0 6%, transparent 6.5%),
        repeating-radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 10px),
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.12), transparent 20%),
        radial-gradient(circle, #2d2d2d 0 52%, #070707 73%, #1b1b1b 100%);
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.32), inset 0 0 0 11px rgba(255, 255, 255, 0.02), inset 0 0 30px rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.turntable-card .vinyl-record::before,
.turntable-card .vinyl-record::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.turntable-card .vinyl-record::before {
    inset: 11%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 3;
}

.turntable-card .vinyl-record::after {
    inset: 24%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 3;
}

.turntable-card .album-art {
    position: relative;
    width: 42%;
    height: 42%;
    border-radius: 50%;
    background: #fffdf8;
    object-fit: cover;
    object-position: center center;
    z-index: 2;
    border: 4px solid #fffdf8;
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.28);
}

.turntable-card .vinyl-hole {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fffdf8;
    border-radius: 50%;
    z-index: 3;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
}

.tonearm {
    position: absolute;
    top: 2.1%;
    right: 4.5%;
    width: 43%;
    height: 25%;
    z-index: 9;
    transform-origin: top right;
    transform: none;
    pointer-events: none;
}

.tonearm.is-playing,
.turntable-card.is-playing .tonearm {
    transform: none;
}

.tonearm-counterweight {
    position: absolute;
    top: 0;
    right: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 34%, #f7f7f5, #747776 48%, #2d2d2d 100%);
    border: 4px solid rgba(45, 45, 45, 0.34);
    box-shadow: 0 8px 16px rgba(45, 45, 45, 0.24);
    z-index: 3;
    transition: box-shadow 0.35s ease;
}

.tonearm-stem {
    position: absolute;
    top: 12px;
    right: 32px;
    width: 68%;
    height: 11px;
    border-radius: 999px;
    background: linear-gradient(180deg, #151515, #8e9291 45%, #f5f5f2 62%, #343635);
    transform: rotate(0deg);
    transform-origin: right center;
    box-shadow: 0 5px 12px rgba(45, 45, 45, 0.26);
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
    will-change: transform;
    overflow: visible;
    z-index: 2;
}

.tonearm-head {
    position: absolute;
    left: -28px;
    top: 50%;
    width: 34px;
    height: 22px;
    border-radius: 5px;
    background: linear-gradient(145deg, #2d2d2d, #9b9f9d);
    border: 3px solid rgba(45, 45, 45, 0.42);
    transform: translateY(-50%) rotate(-4deg);
    transform-origin: 85% 50%;
    box-shadow: 0 8px 14px rgba(45, 45, 45, 0.22);
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
    will-change: transform;
    pointer-events: none;
}

.tonearm.is-playing .tonearm-counterweight,
.turntable-card.is-playing .tonearm-counterweight {
    transform: none;
    box-shadow: 0 10px 18px rgba(45, 45, 45, 0.28);
}

.tonearm.is-playing .tonearm-stem,
.turntable-card.is-playing .tonearm-stem {
    transform: rotate(-14deg);
    box-shadow: 0 6px 13px rgba(45, 45, 45, 0.3);
}

.tonearm.is-playing .tonearm-head,
.turntable-card.is-playing .tonearm-head {
    transform: translateY(-50%) rotate(-10deg) translateX(-1px);
    box-shadow: 0 9px 15px rgba(45, 45, 45, 0.26);
}

.turntable-slider {
    position: absolute;
    z-index: 5;
}

.turntable-slider {
    right: 7%;
    bottom: 7%;
    width: 34px;
    height: 92px;
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.42);
    box-shadow: inset 0 2px 4px rgba(45, 45, 45, 0.14), 0 8px 18px rgba(45, 45, 45, 0.12);
    cursor: ns-resize;
    --volume-level: 100%;
}

.volume-track {
    position: absolute;
    left: 50%;
    top: 9px;
    bottom: 9px;
    width: 8px;
    border-radius: 999px;
    background: rgba(45, 45, 45, 0.16);
    transform: translateX(-50%);
    box-shadow: inset 0 1px 3px rgba(45, 45, 45, 0.16);
}

.volume-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--volume-level);
    border-radius: inherit;
    background: linear-gradient(0deg, #2d2d2d, #777d7a);
}

.volume-knob {
    position: absolute;
    left: 50%;
    bottom: var(--volume-level);
    width: 28px;
    height: 22px;
    border-radius: 5px;
    background: linear-gradient(#5f6361, #2d2d2d);
    box-shadow: 0 5px 10px rgba(45, 45, 45, 0.24);
    transform: translate(-50%, 50%);
    pointer-events: none;
}

.volume-slider-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ns-resize;
    writing-mode: vertical-lr;
    direction: rtl;
    -webkit-appearance: slider-vertical;
}

.turntable-slider:focus-within {
    outline: 3px solid rgba(45, 45, 45, 0.18);
    outline-offset: 4px;
}

.track-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    padding: 1.2rem 0.1rem 0.95rem;
    text-align: left;
    font-family: 'Inter', sans-serif;
}

.track-copy {
    min-width: 0;
}

.music-title {
    color: var(--text-black);
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.35rem, 5vw, 2rem);
    font-weight: 900;
    line-height: 1.06;
    margin: 0 0 0.42rem;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.music-artist {
    color: rgba(45, 45, 45, 0.72);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.music-source-note {
    color: var(--primary-red);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 900;
}

.music-source-note {
    margin-top: 0.5rem;
}

.music-source-note.is-error {
    color: var(--text-black);
}

.track-actions {
    display: flex;
    gap: 0.6rem;
    padding-top: 0.1rem;
    flex: 0 0 auto;
}

.track-action-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: rgba(45, 45, 45, 0.52);
    background: transparent;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 5px;
    box-shadow: none;
    transition: transform 0.18s ease, color 0.18s ease;
}

.track-action-btn:hover,
.track-action-btn:focus-visible {
    color: var(--theme-color);
    background: transparent;
    transform: translateY(-1px);
    outline: none;
}

.track-action-btn.is-active {
    color: var(--theme-color);
    background: transparent;
    box-shadow: none;
}

.track-actions svg,
.music-utility-row svg,
.deck-fx-btn svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.track-action-btn svg {
    width: 100%;
    height: 100%;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 4px 5px rgba(45, 45, 45, 0.12));
}

.track-action-btn.is-active svg {
    fill: currentColor;
}

.player-deck {
    border-radius: 24px;
    padding: 1.35rem 1.05rem 1.15rem;
    background:
        linear-gradient(180deg, rgba(255, 253, 248, 0.92) 0%, rgba(var(--theme-rgb), 0.18) 42%, rgba(var(--theme-rgb), 0.42) 100%);
    border: 1px solid rgba(var(--theme-rgb), 0.18);
    box-shadow: 0 20px 40px rgba(45, 45, 45, 0.12);
    backdrop-filter: blur(10px);
}

.music-utility-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 0.95rem;
}

.deck-fx-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: rgba(45, 45, 45, 0.48);
    background: rgba(255, 253, 248, 0.2);
    display: grid;
    place-items: center;
    justify-self: center;
    cursor: pointer;
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.deck-fx-btn:hover,
.deck-fx-btn:focus-visible {
    color: #2d2d2d;
    background: rgba(255, 253, 248, 0.62);
    transform: translateY(-1px);
    outline: none;
}

.deck-fx-btn.is-active,
.ctrl-btn.is-active {
    color: #fffdf8;
    background: #2d2d2d;
    box-shadow: 0 8px 16px rgba(45, 45, 45, 0.18);
}

.progress-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    max-width: none;
    margin: 0;
}

.progress-container span {
    color: rgba(45, 45, 45, 0.44);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    min-width: 2.4rem;
    font-variant-numeric: tabular-nums;
}

.progress-bar-bg {
    height: 5px;
    border-radius: 999px;
    background: rgba(45, 45, 45, 0.18);
    cursor: pointer;
    position: relative;
    overflow: visible;
    box-shadow: none;
}

.progress-bar-bg:focus-visible {
    outline: 3px solid rgba(var(--theme-rgb), 0.26);
    outline-offset: 5px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: var(--text-black);
    position: relative;
    transition: width 0.12s linear;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-black);
    transform: translateY(-50%);
    box-shadow: 0 1px 4px rgba(45, 45, 45, 0.25);
}

.music-controls {
    display: grid;
    grid-template-columns: 1fr 1fr auto 1fr 1fr;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.25rem;
    --music-button-ink: #2d2d2d;
    --music-button-surface: rgba(255, 253, 248, 0.58);
    --music-button-hover: rgba(45, 45, 45, 0.09);
    --music-button-active: #2d2d2d;
    --music-button-active-ink: #fffdf8;
}

.ctrl-btn {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--music-button-ink);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    justify-self: center;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: none;
}

.ctrl-btn:hover,
.ctrl-btn:focus-visible {
    background: var(--music-button-hover);
    color: var(--music-button-ink);
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(45, 45, 45, 0.12);
    outline: none;
}

.ctrl-btn.is-active:hover,
.ctrl-btn.is-active:focus-visible {
    color: #fffdf8;
    background: #2d2d2d;
}

.play-ctrl,
#play-pause-btn {
    width: 72px;
    height: 72px;
    border: 3px solid var(--music-button-ink);
    background: var(--music-button-surface);
    color: var(--music-button-ink);
}

.play-ctrl:hover,
#play-pause-btn:hover {
    background: var(--music-button-active);
    color: var(--music-button-active-ink);
    border-color: var(--music-button-active);
    transform: translateY(-2px) scale(1.02);
}

.utility-ctrl {
    color: rgba(45, 45, 45, 0.56);
}

#play-icon[hidden],
#pause-icon[hidden] {
    display: none !important;
}

#play-pause-btn.is-playing #play-icon {
    display: none !important;
}

#play-pause-btn.is-playing #pause-icon {
    display: block !important;
}

#play-pause-btn:not(.is-playing) #pause-icon {
    display: none !important;
}

.media-engine {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    opacity: 0.02;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.media-engine iframe {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 520px) {
    .container.music-mode {
        padding: 0.75rem;
    }

    .music-view {
        width: min(100%, 398px);
        min-height: auto;
        padding-top: calc(env(safe-area-inset-top) + 3.95rem);
    }

    .turntable-card {
        border-radius: 21px;
    }

    .track-summary {
        padding: 1.05rem 0.05rem 0.8rem;
    }

    .music-title,
    .music-artist {
        -webkit-line-clamp: 1;
    }

    .track-action-btn {
        width: 30px;
        height: 30px;
    }

    .player-deck {
        border-radius: 22px;
        padding: 1.2rem 0.85rem 1rem;
    }

    .music-controls {
        gap: 0.35rem;
    }

    .ctrl-btn {
        width: 42px;
        height: 42px;
    }

    .play-ctrl,
    #play-pause-btn {
        width: 66px;
        height: 66px;
    }
}

@media (min-width: 700px) and (max-height: 760px) {
    .container.music-mode {
        max-width: 410px;
        padding: 0.75rem;
    }

    .music-view {
        width: min(100%, 340px);
        padding-top: calc(env(safe-area-inset-top) + 3.25rem);
    }

    .track-summary {
        padding: 0.75rem 0.05rem 0.55rem;
    }

    .player-deck {
        padding: 0.85rem 0.75rem 0.75rem;
    }

    .music-utility-row {
        margin-bottom: 0.55rem;
    }

    .deck-fx-btn {
        width: 30px;
        height: 30px;
    }

    .music-controls {
        margin-top: 0.75rem;
    }

    .ctrl-btn {
        width: 38px;
        height: 38px;
    }

    .play-ctrl,
    #play-pause-btn {
        width: 58px;
        height: 58px;
    }
}

@media (min-width: 820px) and (min-height: 560px) and (orientation: landscape) {
    .container.music-mode {
        max-width: min(1120px, calc(100vw - 2rem));
        padding: clamp(0.85rem, 1.8vw, 1.4rem);
    }

    .music-view {
        display: grid;
        grid-template-columns: minmax(330px, 430px) minmax(300px, 360px);
        grid-template-rows: auto auto;
        align-items: center;
        justify-content: center;
        gap: 1rem clamp(1.4rem, 3vw, 2.4rem);
        width: min(100%, 1040px);
        min-height: calc(100svh - 2rem);
        padding: calc(env(safe-area-inset-top) + 2.25rem) clamp(1rem, 2vw, 1.6rem) calc(env(safe-area-inset-bottom) + 1.25rem);
    }

    .record-player-shell {
        display: contents;
    }

    .turntable-card {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: center;
        justify-self: end;
        width: min(43vw, 430px);
        max-width: 430px;
    }

    .track-summary {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        padding: 0 0 0.95rem;
    }

    .music-title {
        font-size: clamp(1.55rem, 2.5vw, 2.05rem);
    }

    .music-artist {
        font-size: 0.95rem;
    }

    .player-deck {
        grid-column: 2;
        grid-row: 2;
        align-self: start;
        justify-self: stretch;
        width: 100%;
        padding: 1.2rem 1rem 1.05rem;
    }

    .music-controls {
        margin-top: 1.05rem;
    }
}

@media (max-width: 360px) {
    .music-view {
        width: 100%;
    }

    .music-title {
        font-size: 1.48rem;
    }

    .music-utility-row {
        gap: 0.35rem;
    }

    .progress-container {
        gap: 0.45rem;
    }
}

/* ===== Flower View - Love Letter Style ===== */
.big-flower-view {
    overflow: visible;
    position: relative;
    min-height: min(76svh, 680px);
    justify-content: center;
    align-items: center;
    width: min(100%, 760px);
    margin: 0 auto;
    padding: 2rem 0 1rem;
    text-align: center;
}

/* Love Letter Scene */
.love-letter-scene {
    position: relative;
    width: 100%;
    max-width: 550px;
    min-height: 420px;
    margin: 0 auto;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Accent envelope */
.pink-envelope {
    position: absolute;
    top: -20px;
    right: -30px;
    width: 320px;
    height: 220px;
    z-index: 1;
    transform: rotate(8deg);
    animation: envelopeSlideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

@keyframes envelopeSlideIn {
    from { opacity: 0; transform: rotate(8deg) translateX(60px) scale(0.8); }
    to { opacity: 1; transform: rotate(8deg) translateX(0) scale(1); }
}

.envelope-back {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--theme-rgb), 0.62), var(--primary-red));
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(var(--theme-rgb), 0.2);
}

.envelope-flap-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 160px solid transparent;
    border-right: 160px solid transparent;
    border-top: 110px solid var(--primary-red);
    opacity: 0.6;
    border-radius: 8px 8px 0 0;
}

.envelope-bow {
    position: absolute;
    bottom: 15px;
    right: 20px;
    width: 44px;
    height: 30px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.envelope-bow::before,
.envelope-bow::after {
    content: '';
    position: absolute;
    top: 3px;
    width: 22px;
    height: 20px;
    background: var(--primary-red);
    border-radius: 60% 40% 55% 45%;
}

.envelope-bow::before {
    left: 0;
    transform: rotate(24deg);
}

.envelope-bow::after {
    right: 0;
    transform: rotate(-24deg);
}

.envelope-bow span {
    position: absolute;
    left: 50%;
    top: 9px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-red);
    transform: translateX(-50%);
    z-index: 2;
}

/* Letter Note Card */
.letter-note-card {
    position: relative;
    z-index: 5;
    background: #fffbf0;
    background-image: repeating-linear-gradient(transparent, transparent 27px, rgba(200,200,200,0.2) 27px, rgba(200,200,200,0.2) 28px);
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 2.5rem 2.5rem 2rem;
    max-width: 420px;
    margin: 60px auto 0;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    transform: rotate(-3deg);
    animation: letterCardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
    opacity: 0;
}

@keyframes letterCardIn {
    from { opacity: 0; transform: rotate(-3deg) translateY(30px) scale(0.9); }
    to { opacity: 1; transform: rotate(-3deg) translateY(0) scale(1); }
}

.flower-title {
    font-family: var(--bold-font);
    font-style: italic;
    font-size: 1.8rem !important;
    color: var(--primary-red);
    margin-bottom: 1rem;
    font-weight: 700;
}

.flower-message {
    font-family: var(--handwriting-font);
    font-size: 1.2rem;
    color: #555;
    line-height: 28px;
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
}

.letter-kiss {
    text-align: right;
    font-size: 1.5rem;
    margin-top: 1rem;
    opacity: 0.7;
    color: var(--primary-red);
}

.letter-sign {
    text-align: right;
    font-family: var(--elegant-font);
    font-size: 1.4rem;
    color: var(--primary-red);
    margin-top: 0.5rem;
}

/* Peony Flower Accent */
.peony-accent {
    position: absolute;
    top: -100px;
    left: -78px;
    width: min(34vw, 210px);
    z-index: 15;
    filter: drop-shadow(0 14px 22px rgba(var(--theme-rgb), 0.28));
    animation: peonySlideIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
    opacity: 0;
}

@keyframes peonySlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.7); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.peony-stem-svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

/* Peony Photo Accent (bottom-left) */
.peony-photo-accent {
    position: absolute;
    bottom: -60px;
    left: -80px;
    width: 220px;
    z-index: 12;
    opacity: 0;
    pointer-events: none;
    animation: peonyPhotoIn 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s forwards;
}

@keyframes peonyPhotoIn {
    from { 
        opacity: 0; 
        transform: rotate(15deg) scaleX(-1) translateY(40px) scale(0.8); 
    }
    to { 
        opacity: 1; 
        transform: rotate(25deg) scaleX(-1) translateY(0) scale(1); 
    }
}

.peony-photo-accent img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 20px rgba(var(--theme-rgb), 0.3));
}

/* Staggered bloom animations */
.peony {
    opacity: 0;
    transform-origin: center;
    animation: bloomIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.bloom-1 { animation-delay: 0.8s; }
.bloom-2 { animation-delay: 1.2s; }

@keyframes bloomIn {
    0% { opacity: 0; transform: scale(0) rotate(-30deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.stem {
    stroke-dasharray: 360;
    stroke-dashoffset: 360;
    animation: drawStem 1.5s ease 0.4s forwards;
}

@keyframes drawStem {
    to { stroke-dashoffset: 0; }
}

.leaf {
    opacity: 0;
    animation: leafGrow 0.8s ease forwards 1s;
}

.peony-leaf {
    opacity: 0;
    animation: peonyLeafFade 0.75s ease 1s forwards;
}

.peony-leaf.small-leaf {
    animation-delay: 1.15s;
}

@keyframes leafGrow {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes peonyLeafFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Sparkle Decorations */
.sparkle-deco {
    position: absolute;
    color: rgba(var(--theme-rgb), 0.4);
    font-size: 1.2rem;
    z-index: 20;
    animation: sparkleFloat 3s ease-in-out infinite;
    pointer-events: none;
}

.s1 { top: 5%; right: 10%; animation-delay: 0s; font-size: 1.5rem; }
.s2 { top: 15%; left: 5%; animation-delay: 0.5s; }
.s3 { top: 60%; right: 5%; animation-delay: 1s; font-size: 1.3rem; }
.s4 { bottom: 20%; left: 8%; animation-delay: 0.3s; font-size: 1.6rem; color: rgba(var(--theme-rgb), 0.3); }
.s5 { top: 40%; right: 15%; animation-delay: 1.5s; }
.s6 { bottom: 10%; right: 20%; animation-delay: 0.8s; font-size: 1.4rem; color: rgba(var(--theme-rgb), 0.25); }
.s7 { top: 25%; right: 25%; animation-delay: 2s; font-size: 0.9rem; }
.s8 { bottom: 35%; left: 15%; animation-delay: 1.2s; font-size: 1.1rem; color: rgba(var(--theme-rgb), 0.35); }

@keyframes sparkleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
    50% { transform: translateY(-8px) scale(1.2); opacity: 0.8; }
}

/* Side Quote */
.side-quote {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-family: var(--handwriting-font);
    font-size: 1rem;
    color: rgba(var(--theme-rgb), 0.5);
    z-index: 5;
    font-style: italic;
}

.left-quote {
    left: -10px;
    bottom: 10%;
}

.side-quote span:first-child {
    color: rgba(var(--theme-rgb), 0.7);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Floating petal particles */
.floating-petals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.petal-float {
    position: absolute;
    top: -40px;
    font-size: 1.8rem;
    color: var(--primary-red);
    animation: petalFall linear infinite;
    opacity: 0.6;
}

@keyframes petalFall {
    0% { transform: translateY(-10vh) rotate(0deg) translateX(0); opacity: 0; }
    10% { opacity: 0.7; }
    100% { transform: translateY(110vh) rotate(720deg) translateX(80px); opacity: 0; }
}

@media (max-width: 600px) {
    .big-flower-view {
        width: 100%;
        min-height: 72svh;
        padding: 1.5rem 0 1rem;
        justify-content: center;
    }

    .love-letter-scene {
        max-width: min(95%, 420px);
        min-height: 390px;
        margin: 0 auto;
    }

    .pink-envelope {
        width: 220px;
        height: 160px;
        top: -10px;
        right: 0;
    }

    .envelope-flap-bg {
        border-left: 110px solid transparent;
        border-right: 110px solid transparent;
        border-top: 80px solid var(--primary-red);
    }
    .letter-note-card {
        max-width: 85%;
        padding: 2rem 1.5rem 1.5rem;
        margin-top: 40px;
    }

    .peony-accent {
        width: 150px;
        top: -78px;
        left: -8px;
    }

    .peony-photo-accent {
        width: 140px;
        bottom: -30px;
        left: 0;
    }

    .flower-title {
        font-size: 1.4rem !important;
    }
    .flower-message {
        font-size: 1.05rem;
    }
    .side-quote {
        display: none;
    }
}

/* Notes View */
.notes-view {
    width: min(96vw, 1440px);
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem clamp(1.5rem, 3vw, 3rem);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    /* Removed heavy border and bg as requested */
    background: transparent;
    margin-top: 2rem;
    overflow: visible;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.4rem;
    width: 100%;
    max-width: 1380px;
    margin-top: 2rem;
}

@media (min-width: 801px) and (orientation: landscape) {
    .notes-grid.is-single-note {
        grid-template-columns: minmax(240px, min(420px, 42vw));
        justify-content: center;
        justify-items: stretch;
        width: min(100%, 560px);
        margin-left: auto;
        margin-right: auto;
    }

    .notes-grid.is-single-note .note-card {
        width: 100%;
        max-width: 420px;
        justify-self: center;
    }
}

.note-card {
    --note-paper: #fffdf7;
    --note-line: rgba(0,0,0,0.055);
    --note-pattern: repeating-linear-gradient(transparent, transparent 27px, var(--note-line) 27px, var(--note-line) 28px);
    --note-rotate: 0deg;
    --note-radius: 8px;
    --photo-rotate: -5deg;
    background-color: var(--note-paper);
    background-image: var(--note-pattern);
    padding: 2.35rem 1.55rem 1.7rem;
    box-shadow: 2px 5px 15px rgba(0,0,0,0.15);
    position: relative;
    font-family: var(--handwriting-font);
    font-size: 1.25rem;
    color: #444;
    line-height: 28px;
    border: 1px solid rgba(92, 64, 55, 0.08);
    border-radius: var(--note-radius);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: rotate(var(--note-rotate));
    animation: notePopUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) var(--note-delay, 0.1s) forwards;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.note-copy {
    position: relative;
    overflow: visible;
}

.note-copy::after {
    content: '';
    display: block;
    clear: both;
}

.note-photo {
    float: left;
    width: clamp(82px, 34%, 124px);
    aspect-ratio: 0.82 / 1;
    margin: -1.3rem 1rem 0.45rem -0.75rem;
    padding: 0.36rem 0.36rem 0.9rem;
    position: relative;
    z-index: 4;
    background: #fffdf8;
    border: 1px solid rgba(92, 64, 55, 0.12);
    border-radius: 4px;
    box-shadow: 0 12px 20px rgba(45, 45, 45, 0.18), 0 1px 0 rgba(255, 255, 255, 0.88) inset;
    transform: rotate(var(--photo-rotate));
    transform-origin: center center;
    shape-outside: inset(0 round 8px);
    shape-margin: 0.55rem;
    pointer-events: none;
}

.note-photo::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0.25rem;
    width: 28%;
    height: 2px;
    border-radius: 999px;
    background: rgba(45, 45, 45, 0.18);
    transform: translateX(-50%);
}

.note-photo-landscape {
    width: clamp(96px, 42%, 154px);
    aspect-ratio: 1.38 / 1;
    margin-right: 1.08rem;
}

.note-photo-portrait {
    width: clamp(76px, 31%, 116px);
    aspect-ratio: 0.76 / 1;
}

.note-photo img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: inset 0 0 0 1px rgba(45, 45, 45, 0.08);
    filter: saturate(0.94) contrast(0.98);
}

/* Paper Color Varieties */
.paper-yellow { --note-paper: var(--theme-wash); --note-line: rgba(var(--theme-rgb), 0.08); }
.paper-pink { --note-paper: var(--theme-soft); --note-line: rgba(var(--theme-rgb), 0.09); }
.paper-blue { --note-paper: color-mix(in srgb, var(--theme-soft) 72%, #fff 28%); --note-line: rgba(var(--theme-rgb), 0.1); }
.paper-white { --note-paper: #ffffff; --note-line: rgba(var(--theme-rgb), 0.06); }
.paper-mint { --note-paper: color-mix(in srgb, var(--theme-wash) 86%, var(--primary-red) 14%); --note-line: rgba(var(--theme-rgb), 0.09); }
.paper-lavender { --note-paper: color-mix(in srgb, var(--theme-soft) 62%, #fff 38%); --note-line: rgba(var(--theme-rgb), 0.1); }
.paper-peach { --note-paper: color-mix(in srgb, var(--theme-wash) 78%, var(--primary-red) 22%); --note-line: rgba(var(--theme-rgb), 0.1); }
.paper-cream { --note-paper: color-mix(in srgb, var(--theme-wash) 92%, #fff 8%); --note-line: rgba(var(--theme-rgb), 0.08); }

.note-lines {
    --note-pattern: repeating-linear-gradient(transparent, transparent 27px, var(--note-line) 27px, var(--note-line) 28px);
}

.note-soft-lines {
    --note-pattern:
        linear-gradient(90deg, rgba(var(--theme-rgb), 0.16) 0 2px, transparent 2px 100%),
        repeating-linear-gradient(transparent, transparent 27px, var(--note-line) 27px, var(--note-line) 28px);
}

.note-grid {
    --note-pattern:
        repeating-linear-gradient(transparent, transparent 27px, var(--note-line) 27px, var(--note-line) 28px),
        repeating-linear-gradient(90deg, transparent, transparent 27px, rgba(0, 0, 0, 0.035) 27px, rgba(0, 0, 0, 0.035) 28px);
}

.note-dots {
    --note-pattern: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.08) 1px, transparent 1.5px);
    background-size: 18px 18px;
}

.note-diagonal {
    --note-pattern: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0 8px, transparent 8px 18px);
}

.note-card.span-2 {
    grid-column: span 2;
}

@media (max-width: 800px) {
    .note-card.span-2 {
        grid-column: span 1;
    }
}

@keyframes notePopUp {
    from {
        opacity: 0;
        transform: rotate(var(--note-rotate)) scale(0.5) translateY(50px);
    }

    to {
        opacity: 1;
        transform: rotate(var(--note-rotate)) scale(1) translateY(0);
    }
}

.note-card:hover {
    transform: rotate(var(--note-rotate)) scale(1.05) translateY(-5px) !important;
    z-index: 100;
}

.note-sig {
    display: block;
    clear: both;
    text-align: right;
    margin-top: 1rem;
    font-weight: 700;
    color: var(--primary-red);
}

/* Rotations */
.rot-left {
    --note-rotate: -3deg;
}

.rot-right {
    --note-rotate: 3deg;
}

.rot-left-slight {
    --note-rotate: -1.5deg;
}

.rot-right-slight {
    --note-rotate: 1.5deg;
}

.rot-straight {
    --note-rotate: 0deg;
}

.rot-tilt-deep-left {
    --note-rotate: -5deg;
}

.rot-tilt-deep-right {
    --note-rotate: 5deg;
}

.note-card p {
    margin: 0 0 0.65rem;
    padding: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.note-card p:last-of-type {
    margin-bottom: 0;
}

/* Note Card Decorative Styles */
.note-card::before,
.note-card::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

/* TAPE STYLE */
.style-tape::before {
    width: 100px;
    height: 30px;
    background: rgba(var(--theme-rgb), 0.18);
    top: -15px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.style-tape-top::before {
    width: 80px;
    height: 25px;
    background: linear-gradient(90deg, rgba(255,255,255,0.35), rgba(var(--theme-rgb), 0.24));
    top: -10px;
    left: 10%;
    transform: rotate(-15deg);
    z-index: 2;
}

/* CLIP STYLE */
.style-clip::before {
    width: 34px;
    height: 52px;
    border: 4px solid var(--primary-red);
    border-left-width: 7px;
    background: transparent;
    border-radius: 18px;
    top: -18px;
    left: 50%;
    transform: translateX(-50%) rotate(7deg);
    box-shadow: inset 0 0 0 4px rgba(255,255,255,0.42), 0 4px 8px rgba(0,0,0,0.12);
}

/* PIN STYLE */
.style-pin::before {
    width: 12px;
    height: 12px;
    background: var(--note-accent, var(--primary-red));
    border-radius: 50%;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* PUSHPIN STYLE */
.style-pushpin::before {
    width: 18px;
    height: 18px;
    background: var(--note-accent, #333);
    border-radius: 50% 50% 0 0;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.style-washi::before {
    width: 120px;
    height: 28px;
    top: -14px;
    right: 18px;
    transform: rotate(8deg);
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.36) 0 7px, transparent 7px 14px),
        var(--note-accent, var(--primary-red));
    opacity: 0.68;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    z-index: 2;
}

.style-corner-tape::before {
    width: 92px;
    height: 30px;
    top: 5px;
    left: -28px;
    transform: rotate(-42deg);
    background: rgba(255,255,255,0.58);
    border: 1px solid rgba(255,255,255,0.42);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    z-index: 2;
}

.style-stamp::before {
    content: 'SAMPLE';
    top: 14px;
    right: 16px;
    padding: 0.24rem 0.42rem;
    border: 2px solid var(--note-accent, var(--primary-red));
    color: var(--note-accent, var(--primary-red));
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    transform: rotate(8deg);
    opacity: 0.72;
}

.style-ribbon::before {
    top: 0;
    left: 22px;
    width: 22px;
    height: 62px;
    background: var(--note-accent, var(--primary-red));
    opacity: 0.58;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}

.edge-soft {
    --note-radius: 14px;
}

.edge-rounded {
    --note-radius: 22px;
}

.edge-deckled {
    --note-radius: 7px 18px 10px 16px;
    box-shadow: 3px 6px 16px rgba(0,0,0,0.16), inset 0 0 0 1px rgba(255,255,255,0.38);
}

.edge-corner-fold::after {
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 42px 42px;
    border-color: transparent transparent rgba(0,0,0,0.12) transparent;
    filter: drop-shadow(-2px -2px 2px rgba(255,255,255,0.45));
}

.note-variant-1 {
    border-top: 4px solid var(--note-accent, var(--primary-red));
}

.note-variant-2 {
    border-left: 5px solid var(--note-accent, var(--primary-red));
}

.note-variant-3 {
    border-bottom: 4px solid var(--note-accent, var(--primary-red));
}

.note-variant-4 {
    box-shadow: 2px 5px 15px rgba(0,0,0,0.15), inset 0 0 0 3px rgba(255,255,255,0.36);
}

/* Stagger Animation */
.note-card:nth-child(1) {
    animation-delay: var(--note-delay, 0.1s);
}

.note-card:nth-child(2) {
    animation-delay: var(--note-delay, 0.3s);
}

.note-card:nth-child(3) {
    animation-delay: var(--note-delay, 0.5s);
}

.note-card:nth-child(4) {
    animation-delay: var(--note-delay, 0.7s);
}

.note-card:nth-child(5) {
    animation-delay: var(--note-delay, 0.9s);
}

/* Board Decorations */
.board-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.board-item {
    position: absolute;
    color: var(--primary-red);
    animation: boardFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

@keyframes boardFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@media (max-width: 600px) {
    .notes-view {
        width: 100%;
        left: auto;
        transform: none;
        padding: 3rem 1rem;
    }

    .notes-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .note-photo {
        width: clamp(74px, 29%, 108px);
        margin-left: -0.45rem;
        margin-right: 0.85rem;
    }

    .note-photo-landscape {
        width: clamp(94px, 39%, 138px);
    }
}

/* Note Modal Enlarged View */
.note-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.note-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-note-container {
    width: 90%;
    max-width: 550px;
    height: auto;
    position: relative;
    cursor: grab;
    user-select: none;
}

.modal-note-container:active {
    cursor: grabbing;
}

.modal-note-container .note-card {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
    font-size: 1.6rem;
    padding: 4rem 2.7rem 3.25rem;
    box-shadow: 0 30px 70px rgba(0,0,0,0.5);
    pointer-events: none;
    background-image: var(--note-pattern);
    line-height: 35px;
}

.modal-note-container .note-photo {
    width: min(32%, 148px);
    margin: -1.8rem 1.25rem 0.75rem -1.05rem;
}

.modal-note-container .note-photo-landscape {
    width: min(43%, 190px);
}

.modal-note-container.slide-transition {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
    position: absolute;
    top: -60px;
    right: 0;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    transition: transform 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.1);
}

.swipe-hint {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    font-style: italic;
    white-space: nowrap;
}

#fourbox-mount{width:100%;min-height:100vh;display:flex;justify-content:center;align-items:center;position:relative;}

html, body {
    overflow-x: hidden;
}

.warning-box .bold-text {
    min-height: 2.4em;
}

body.is-published-fourbox .fourbox-create-own-btn {
    display: none !important;
}

.container {
    transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.yes-btn:active,
.no-btn:active,
.okay-btn:active,
.back-btn:active {
    transform: translateY(1px) scale(0.98);
}

.note-photo img,
.category-card img,
.gift-container img {
    transform: translateZ(0);
}

.note-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .fade-out,
    .yes-btn,
    .no-btn,
    .okay-btn,
    .petal-float,
    .sparkle-deco {
        animation: none !important;
        transition: none !important;
    }

    .fade-in,
    .button-group {
        opacity: 1 !important;
        transform: none !important;
    }
}


/* Functional additions only when a customer selects an uploaded recording. */
.lemy-native-audio{padding:16px}.lemy-native-audio audio{width:100%;min-height:44px}
.letter-text{overflow-wrap:anywhere}
