/* /home/apps/www/krathong2/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
    --gold: #FFDA00;
    --gold-dark: #B8860B;
    --primary-orange: #f97316;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
    user-select: none;
    background-color: #030a1c;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Bai Jamjuree', sans-serif;
}

/* Master Stage: 100% Fullscreen Seamless Container */
.scene-stage {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background-color: #030a1c;
}

/* Layer 0: Fullscreen Sky */
.layer-sky {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 1;
    pointer-events: none;
}

/* Layer 1: Twinkling Stars */
.layer-stars {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background-image: 
        radial-gradient(1px 1px at 15% 20%, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 30% 12%, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 45% 28%, #ffeb3b, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 60% 15%, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 75% 22%, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 85% 10%, #ffeb3b, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 20% 35%, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 70% 38%, #fff, rgba(0,0,0,0));
    animation: starsTwinkle 3s ease-in-out infinite alternate;
}

@keyframes starsTwinkle {
    0% { opacity: 0.5; }
    100% { opacity: 0.95; }
}

/* Layer 2: Moon with Breathing Aura */
.layer-moon {
    position: absolute;
    top: var(--moon-top, 5%);
    right: var(--moon-right, 12%);
    transform: scale(var(--moon-scale, 1));
    transform-origin: center center;
    width: 105px;
    height: 105px;
    z-index: 3;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: top 0.3s ease, right 0.3s ease, transform 0.3s ease;
}

.moon-halo {
    position: absolute;
    inset: -30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 220, 130, 0.6) 0%, rgba(255, 180, 80, 0.25) 45%, rgba(255, 150, 50, 0) 70%);
    animation: moonPulse 5s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes moonPulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.2); opacity: 1; }
}

/* Layer 3: Looping Fireworks */
.layer-fireworks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 52%;
    object-fit: contain;
    object-position: center top;
    z-index: 4;
    pointer-events: none;
    opacity: 0.85;
    animation: fireworksFade 7s ease-in-out infinite alternate;
}

@keyframes fireworksFade {
    0% { opacity: 0.45; transform: scale(0.99); }
    50% { opacity: 0.95; transform: scale(1.02); }
    100% { opacity: 0.6; transform: scale(1); }
}

/* Layer 3.8: Interactive Particles Canvas */
.layer-fx-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 9;
    pointer-events: none;
}

/* Layer 4: Landmark & Living River (Seamless 100% Cover) */
.layer-landmark {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    z-index: 5;
    pointer-events: none;
}

/* Layer 5: Drifting Viewports */
.sky-viewport {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    z-index: 10;
    pointer-events: none;
}

.river-viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 12;
    pointer-events: none;
}

.krathong-item,
.lantern-item {
    pointer-events: auto;
}

/* Krathong Entities */
.krathong-item {
    position: absolute;
    cursor: pointer;
    will-change: transform, left, top;
}

.krathong-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.krathong-item.is-hovered .krathong-inner {
    transform: scale(1.16);
}

.krathong-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.45));
    transition: filter 0.25s ease;
}

.krathong-item.is-hovered img {
    filter: drop-shadow(0 0 20px rgba(255, 218, 0, 0.95)) drop-shadow(0 8px 20px rgba(0,0,0,0.85));
}

/* Compact Wish Bubble (Normal State) */
.wish-bubble.compact-bubble {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 18, 38, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 218, 0, 0.55);
    border-radius: 9999px;
    padding: 3px 12px;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 220px;
    opacity: 1;
}

.wish-bubble.compact-bubble:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(10, 18, 38, 0.9) transparent transparent transparent;
}

.wish-bubble.compact-bubble .wish-text {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fef08a;
}

.wish-bubble.compact-bubble .sender-name {
    color: #93c5fd;
    font-weight: 600;
}

.krathong-item.is-hovered .wish-bubble.compact-bubble {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(6px);
}

/* Full Rich Detail Card on Hover */
.wish-hover-card {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 300px;
    max-width: 90vw;
    background: linear-gradient(145deg, rgba(13, 23, 49, 0.97) 0%, rgba(8, 14, 30, 0.98) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(255, 218, 0, 0.75);
    border-radius: 16px;
    padding: 12px 14px;
    color: #fff;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 218, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
    z-index: 10000;
}

.krathong-item.is-hovered .wish-hover-card,
.lantern-item.is-hovered .wish-hover-card {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.wish-hover-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 8px;
}

.wish-hover-card .card-sender-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 180px;
}

.wish-hover-card .card-lotus-icon {
    font-size: 14px;
    line-height: 1;
}

.wish-hover-card .card-sender-name {
    font-family: 'Bai Jamjuree', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #fde047;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wish-hover-card .card-type-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 9999px;
    background: rgba(234, 88, 12, 0.3);
    border: 1px solid rgba(251, 146, 60, 0.5);
    color: #fed7aa;
    white-space: nowrap;
}

.wish-hover-card .card-body {
    position: relative;
    padding: 2px 2px 6px;
    font-family: 'Sarabun', sans-serif;
    color: #f8fafc;
    font-size: 13.5px;
    line-height: 1.55;
    word-break: break-word;
    white-space: normal;
    max-height: 140px;
    overflow-y: auto;
}

.wish-hover-card .quote-sym {
    color: #fbbf24;
    font-size: 16px;
    font-family: serif;
    font-weight: bold;
}

.wish-hover-card .card-full-wish {
    display: inline;
    font-style: normal;
}

.wish-hover-card .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.wish-hover-card .card-time-badge {
    display: flex;
    align-items: center;
}

.wish-hover-card .card-click-hint {
    color: #facc15;
    font-size: 10.5px;
    font-weight: 600;
}

.wish-hover-card .card-arrow {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(255, 218, 0, 0.75);
}

/* Sky Lantern Entity */
.lantern-item {
    position: absolute;
    cursor: pointer;
    transition: transform 0.2s ease-out;
    filter: drop-shadow(0 0 20px rgba(255, 190, 60, 0.95));
    will-change: transform, left, top;
}

.lantern-item.is-hovered {
    z-index: 9999 !important;
}

.lantern-item.is-hovered .krathong-inner {
    transform: scale(1.22);
}

.lantern-item.is-hovered img {
    filter: drop-shadow(0 0 25px rgba(255, 180, 50, 1)) drop-shadow(0 0 12px rgba(255, 230, 120, 0.95));
}

.lantern-item.is-hovered .wish-bubble.compact-bubble {
    opacity: 0;
    pointer-events: none;
}

/* Layer 6: Wooden Pier Foreground */
.layer-pier {
    position: absolute;
    bottom: var(--pier-bottom-offset, 0px);
    left: 50%;
    transform: translateX(-50%) scale(var(--pier-scale, 1));
    transform-origin: center bottom;
    width: 100%;
    max-width: 1920px;
    height: var(--pier-height, 28%);
    background-size: 100% 100%;
    background-position: center bottom;
    background-repeat: no-repeat;
    z-index: 20;
    pointer-events: none;
    transition: height 0.3s ease, transform 0.3s ease;
}

.layer-decor {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 21;
    pointer-events: none;
}

.decor-lotus-left {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
    transform: scale(var(--lotus-left-scale, 1));
    transform-origin: bottom left;
    transition: transform 0.3s ease;
}

.decor-lotus-right {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
    transform: scale(var(--lotus-right-scale, 1));
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.decor-garland {
    position: absolute;
    bottom: 45px;
    left: 9%;
    width: 120px;
    height: auto;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
    display: var(--garland-display, block);
    transform: scale(var(--garland-scale, 1));
    transform-origin: center bottom;
    transition: transform 0.3s ease;
}

/* Pier Staging Zone (User Krathong before release) */
.pier-staging {
    position: absolute;
    bottom: 11%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    /* stable staging container */
}

@keyframes pierGentleBob {
    0% { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(-5px); }
}

.pier-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* UI Elements & Royal Golden Design System */

/* Master CTA Button Container */
.cta-container {
    position: absolute;
    bottom: var(--cta-bottom, 8%);
    left: 50%;
    transform: translateX(-50%) scale(var(--cta-scale, 1));
    transform-origin: center bottom;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    transition: bottom 0.3s ease, transform 0.3s ease;
}

/* Pulsing Ambient Golden Ripple Aura */
.cta-ripple-aura {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 108%;
    height: 118%;
    transform: translate(-50%, -50%);
    border-radius: 9999px;
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.45) 0%, rgba(245, 158, 11, 0.22) 50%, rgba(234, 88, 12, 0) 75%);
    animation: ctaAuraPulse 2.8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes ctaAuraPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.96);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.24);
        opacity: 0.95;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.96);
        opacity: 0.5;
    }
}

/* The Royal Gold Button */
.btn-royal-gold {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 44px;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(135deg, #FFFDE0 0%, #FFE066 20%, #F59E0B 52%, #D97706 78%, #B45309 100%);
    color: #451a03;
    font-family: 'Bai Jamjuree', sans-serif;
    font-weight: 800;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 
        0 0 0 1px rgba(255, 235, 59, 0.7),
        0 0 32px rgba(245, 158, 11, 0.65),
        0 12px 28px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.95),
        inset 0 -2px 4px rgba(180, 83, 9, 0.4);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateZ(0);
    touch-action: manipulation;
}

.btn-royal-gold:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 
        0 0 0 2px rgba(255, 255, 255, 1),
        0 0 45px rgba(251, 191, 36, 0.9),
        0 16px 36px rgba(0, 0, 0, 0.6),
        inset 0 3px 5px rgba(255, 255, 255, 1),
        inset 0 -3px 5px rgba(180, 83, 9, 0.45);
    filter: brightness(1.05);
}

.btn-royal-gold:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: 
        0 0 18px rgba(245, 158, 11, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Shimmer Light Reflection */
.cta-shimmer {
    position: absolute;
    top: 0;
    left: -150%;
    width: 75%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: ctaShimmer 3.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ctaShimmer {
    0%, 35% {
        left: -150%;
    }
    65%, 100% {
        left: 200%;
    }
}

.cta-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
}

.cta-lotus-icon {
    font-size: 26px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.btn-royal-gold:hover .cta-lotus-icon {
    transform: rotate(12deg) scale(1.1);
}

.cta-sparkle-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    font-size: 13px;
}

.cta-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    line-height: 1.15;
}

.btn-royal-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #451a03;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
}

.btn-royal-subtitle {
    font-size: 11px;
    font-weight: 600;
    color: #78350f;
    letter-spacing: 0.04em;
    margin-top: 1px;
}

.cta-arrow-icon {
    font-size: 1.25rem;
    color: rgba(69, 26, 3, 0.7);
    font-weight: 900;
    transition: transform 0.2s ease;
}

.btn-royal-gold:hover .cta-arrow-icon {
    transform: translateX(3px);
    color: #451a03;
}

/* Backward compatibility for btn-gold */
.btn-gold {
    background: linear-gradient(135deg, #FFE066 0%, #F59E0B 52%, #D97706 100%);
    color: #451a03;
    font-weight: 700;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 18px rgba(234, 88, 12, 0.4), inset 0 1px 1px rgba(255,255,255,0.8);
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.btn-gold:hover {
    transform: scale(1.05);
    filter: brightness(1.08);
    box-shadow: 0 6px 22px rgba(234, 88, 12, 0.6);
}

.btn-gold:active {
    transform: scale(0.96);
}

.top-pill {
    background: rgba(10, 18, 38, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 218, 0, 0.35);
    color: #fff;
    border-radius: 9999px;
    padding: 6px 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    touch-action: manipulation;
}

.sound-toggle-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 50;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(10, 18, 38, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 218, 0, 0.4);
    color: #FFDA00;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.sound-toggle-btn:hover {
    transform: scale(1.1);
    background: rgba(30, 41, 59, 0.95);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 10, 28, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 12px;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #ffffff;
    border-radius: 22px;
    max-width: 720px;
    width: 100%;
    max-height: 92dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65);
    transform: scale(0.94);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.active .modal-content {
    transform: scale(1);
}

/* Form input font size 16px to prevent iOS Safari auto-zoom */
input[type="text"],
textarea {
    font-size: 16px !important;
}

/* Krathong Radio Grid */
.krathong-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px;
}

.krathong-option {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.krathong-option:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    transform: translateY(-1px);
}

.krathong-option.selected {
    border-color: #ea580c;
    background: #fff7ed;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.35), 0 4px 10px rgba(234, 88, 12, 0.15);
    transform: translateY(-2px);
}

.krathong-option.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.krathong-option.locked:after {
    content: '🔒';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 12px;
}

.krathong-item.is-spotlighted img,
.lantern-item.is-spotlighted img {
    filter: drop-shadow(0 0 35px rgba(255, 218, 0, 1)) drop-shadow(0 0 15px rgba(255, 255, 255, 0.9)) !important;
    transform: scale(1.25) !important;
}

/* Preset Wish Chips */
.preset-wish-chip {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    white-space: nowrap;
    touch-action: manipulation;
}

.preset-wish-chip:active {
    transform: scale(0.95);
}

/* Catalog Filter Tabs */
.catalog-tab-btn {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

/* Multi-Device Media Queries */
@media (max-width: 640px) {
    .layer-moon {
        width: 70px;
        height: 70px;
        top: 3.5%;
        right: 5%;
    }
    .layer-pier {
        height: 28%;
    }
    .decor-lotus-left {
        width: 95px;
        bottom: 15px;
    }
    .decor-lotus-right {
        width: 105px;
        bottom: 12px;
    }
    .decor-garland {
        display: none;
    }
    .cta-container {
    position: absolute;
    bottom: var(--cta-bottom, 8%);
    left: 50%;
    transform: translateX(-50%) scale(var(--cta-scale, 1));
    transform-origin: center bottom;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    transition: bottom 0.3s ease, transform 0.3s ease;
}
    .btn-royal-gold {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 44px;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(135deg, #FFFDE0 0%, #FFE066 20%, #F59E0B 52%, #D97706 78%, #B45309 100%);
    color: #451a03;
    font-family: 'Bai Jamjuree', sans-serif;
    font-weight: 800;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 
        0 0 0 1px rgba(255, 235, 59, 0.7),
        0 0 32px rgba(245, 158, 11, 0.65),
        0 12px 28px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.95),
        inset 0 -2px 4px rgba(180, 83, 9, 0.4);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateZ(0);
    touch-action: manipulation;
}
    .btn-royal-title {
        font-size: 1.25rem; /* 20px */
    }
    .btn-royal-subtitle {
        font-size: 9.5px;
    }
    .cta-lotus-icon {
        font-size: 22px;
    }
    .cta-arrow-icon {
        font-size: 1.05rem;
    }
    .modal-content {
        width: 96%;
        max-height: 94dvh;
        border-radius: 18px;
        padding: 1rem !important;
    }
    .krathong-grid {
        grid-template-columns: repeat(3, 1fr);
        max-height: 170px;
    }
    .pier-staging {
        bottom: 12%;
    }
    .sound-toggle-btn {
        bottom: 14px;
        right: 12px;
        width: 42px;
        height: 42px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .layer-moon {
        width: 55px;
        height: 55px;
        top: 2%;
        right: 5%;
    }
    .layer-pier {
        height: 35%;
    }
    .cta-container {
    position: absolute;
    bottom: var(--cta-bottom, 8%);
    left: 50%;
    transform: translateX(-50%) scale(var(--cta-scale, 1));
    transform-origin: center bottom;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    transition: bottom 0.3s ease, transform 0.3s ease;
}
    .btn-royal-gold {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 44px;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(135deg, #FFFDE0 0%, #FFE066 20%, #F59E0B 52%, #D97706 78%, #B45309 100%);
    color: #451a03;
    font-family: 'Bai Jamjuree', sans-serif;
    font-weight: 800;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 
        0 0 0 1px rgba(255, 235, 59, 0.7),
        0 0 32px rgba(245, 158, 11, 0.65),
        0 12px 28px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.95),
        inset 0 -2px 4px rgba(180, 83, 9, 0.4);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateZ(0);
    touch-action: manipulation;
}
    .btn-royal-title {
        font-size: 1.1rem;
    }
    .btn-royal-subtitle {
        display: none;
    }
    .modal-content {
        max-height: 95dvh;
        padding: 0.75rem !important;
    }
    .pier-staging {
        bottom: 5%;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .btn-royal-gold {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 44px;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(135deg, #FFFDE0 0%, #FFE066 20%, #F59E0B 52%, #D97706 78%, #B45309 100%);
    color: #451a03;
    font-family: 'Bai Jamjuree', sans-serif;
    font-weight: 800;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 
        0 0 0 1px rgba(255, 235, 59, 0.7),
        0 0 32px rgba(245, 158, 11, 0.65),
        0 12px 28px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.95),
        inset 0 -2px 4px rgba(180, 83, 9, 0.4);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateZ(0);
    touch-action: manipulation;
}
    .btn-royal-title {
        font-size: 1.45rem;
    }
    .krathong-grid {
        grid-template-columns: repeat(4, 1fr);
        max-height: 220px;
    }
}
