/* ================================ */
/* Elegant Design System            */
/* Inspired by handcrafted luxury   */
/* ================================ */
:root {
    /* Typography */
    --font-serif: 'Noto Serif', Georgia, serif;
    --font-display: 'Manrope', system-ui, -apple-system, sans-serif;
    --font-script: 'Dancing Script', cursive;

    /* Color Palette - Warm & Intimate */
    --bg-primary: #faf5f0;
    --bg-dark: #1a1a1a;
    --accent: #a84d55;
    --accent-light: rgba(168, 77, 85, 0.1);
    --accent-muted: rgba(168, 77, 85, 0.6);

    /* Text Colors */
    --text-primary: #2B2D2F;
    --text-muted: #846264;
    --text-subtle: #a8a8a8;

    /* Surface Colors */
    --paper: #FBF8F5;
    --paper-shadow: rgba(43, 45, 47, 0.12);
    --border-light: rgba(0, 0, 0, 0.06);

    /* Ticket Colors */
    --ticket-navy: #1a2a3a;
    --ticket-gold: #C9A961;

    /* Timing */
    --duration-fast: 200ms;
    --duration-normal: 400ms;
    --duration-slow: 700ms;

    /* Easing */
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-display);
    background: var(--bg-primary);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overscroll-behavior-y: contain;
}

/* Selection styling */
::selection {
    background: var(--accent-light);
    color: var(--accent);
}

/* Screen-reader-only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ================================ */
/* Ambient Background Textures      */
/* ================================ */
.texture-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
    mix-blend-mode: multiply;
    background-image: radial-gradient(circle at center, transparent 0%, rgba(230, 223, 214, 0.8) 100%);
}

.paper-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ================================ */
/* Motion Toggle Button             */
/* ================================ */
.motion-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
}

.motion-toggle:hover {
    color: var(--accent);
    border-color: var(--accent-muted);
}

.motion-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.motion-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform var(--duration-normal) var(--ease-spring);
}

.motion-toggle:hover svg {
    transform: translateX(2px);
}

.motion-toggle[aria-pressed="true"] {
    color: var(--accent);
}

/* ================================ */
/* Stage Base                       */
/* ================================ */
.stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-slow) var(--ease-out),
                visibility var(--duration-slow) var(--ease-out);
    z-index: 1;
}

.stage.active {
    opacity: 1;
    visibility: visible;
}

/* ARIA Live Region */
.stage-announcer {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ================================ */
/* Animations                       */
/* ================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(30px) rotate(0deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(1deg);
    }
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.animate-fade-in-up {
    animation: fadeInUp 1.2s var(--ease-out) forwards;
}

.animate-fade-in {
    animation: fadeIn 1s var(--ease-out) forwards;
}

.animate-float-in {
    animation: floatIn 1.2s var(--ease-out) forwards;
}

.animate-gentle-float {
    animation: gentleFloat 4s ease-in-out infinite;
}

/* Staggered delays */
.delay-1 { animation-delay: 0.2s; opacity: 0; }
.delay-2 { animation-delay: 0.4s; opacity: 0; }
.delay-3 { animation-delay: 0.6s; opacity: 0; }
.delay-4 { animation-delay: 0.8s; opacity: 0; }

/* ================================ */
/* Stage 0: Secret Code Entry       */
/* ================================ */
.code-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
    padding: 40px;
}

.code-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.code-subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--accent-muted);
    margin-bottom: 48px;
}

.code-input-wrapper {
    max-width: 360px;
    margin: 0 auto 24px;
}

.code-input {
    width: 100%;
    padding: 16px 0;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-align: center;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-bottom: 1px solid #dcdcdc;
    outline: none;
    transition: all var(--duration-normal) var(--ease-out);
}

.code-input::placeholder {
    color: var(--text-subtle);
    opacity: 0.5;
}

.code-input:focus {
    border-bottom-color: var(--accent);
}

.code-input.shake {
    animation: shake 0.5s var(--ease-out);
    border-bottom-color: var(--accent);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-8px); }
    80% { transform: translateX(8px); }
}

.unlock-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    background: transparent;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

.unlock-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-light);
    border-radius: 50px;
    transform: scaleX(0);
    transition: transform var(--duration-slow) var(--ease-out);
}

.unlock-btn:hover::before {
    transform: scaleX(1);
}

.unlock-btn span {
    position: relative;
    z-index: 1;
}

.unlock-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.error-message {
    margin-top: 24px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--accent);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.error-message.show {
    opacity: 1;
}

/* ================================ */
/* Stage 1: Birthday Greeting       */
/* ================================ */
.greeting-container {
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

.greeting-preheader {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent-muted);
    margin-bottom: 20px;
}

.greeting-title {
    font-family: var(--font-script);
    font-size: clamp(3.5rem, 12vw, 8rem);
    font-weight: 400;
    color: var(--text-primary);
    line-height: 0.9;
    margin-bottom: 48px;
}

.gift-icon-wrapper {
    margin-bottom: 32px;
}

.gift-icon-wrapper .material-symbols-outlined {
    font-size: 48px;
    color: var(--accent-muted);
    font-variation-settings: 'FILL' 0, 'wght' 200;
}

.gift-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid var(--accent-muted);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--duration-slow) var(--ease-out);
}

.gift-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    letter-spacing: 0.2em;
}

.gift-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* ================================ */
/* Stage 2: Personal Note Card      */
/* ================================ */
.note-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.note-card {
    position: relative;
    width: 100%;
    background: var(--paper);
    border-radius: 4px;
    padding: clamp(32px, 6vw, 64px);
    box-shadow: 0 20px 40px -10px var(--paper-shadow),
                0 0 2px 0 rgba(0, 0, 0, 0.05);
    transform: rotate(1deg);
    transition: transform var(--duration-slow) var(--ease-out);
    cursor: default;
}

.note-card:hover {
    transform: rotate(0deg);
}

/* Paper texture on card */
.note-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    border-radius: 4px;
}

/* Decorative heart seal */
.note-seal {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: 50%;
}

.note-seal .material-symbols-outlined {
    font-size: 24px;
    color: var(--accent);
    font-variation-settings: 'FILL' 1, 'wght' 300;
}

.note-seal::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid var(--accent-light);
    border-radius: 50%;
}

.note-date {
    font-family: var(--font-serif);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-subtle);
    text-align: right;
    padding-right: 64px;
    margin-bottom: 32px;
}

.note-salutation {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.note-body {
    font-family: var(--font-script);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    line-height: 1.6;
    color: var(--accent);
}

.note-body p {
    margin-bottom: 20px;
}

.note-signoff {
    text-align: right;
    margin-top: 32px;
}

.note-signoff-label {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.note-signature {
    font-family: var(--font-script);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    color: var(--accent);
}

.note-action {
    margin-top: 48px;
}

.note-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
}

.note-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.note-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 50%;
    color: white;
    transition: transform var(--duration-normal) var(--ease-spring);
}

.note-btn:hover .note-btn-icon {
    transform: scale(1.1);
}

.note-btn-icon .material-symbols-outlined {
    font-size: 18px;
}

/* ================================ */
/* Stage 3: Ticket Reveal           */
/* ================================ */
.reveal-container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
}

.reveal-header {
    text-align: center;
    margin-bottom: 40px;
}

.reveal-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.reveal-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 400;
    color: var(--text-primary);
}

/* The Ticket */
.ticket {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--ticket-navy);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
    .ticket {
        flex-direction: row;
        min-height: 340px;
    }
}

/* Ticket texture */
.ticket::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.05;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.ticket-main {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .ticket-main {
        padding: 40px;
    }
}

/* Decorative wave */
.ticket-wave {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.08;
    pointer-events: none;
    overflow: hidden;
}

.ticket-wave svg {
    width: 100%;
    max-width: 600px;
}

.ticket-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.ticket-meta-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ticket-concert-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ticket-gold);
}

.ticket-tour-label {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.ticket-icon {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(201, 169, 97, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticket-icon .material-symbols-outlined {
    font-size: 24px;
    color: var(--ticket-gold);
}

.ticket-artist {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 400;
    color: white;
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(to right, #a17f35 0%, #fbeea5 50%, #a17f35 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 5s linear infinite;
}

.ticket-tour-name {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.1rem;
    color: rgba(201, 169, 97, 0.8);
    margin-bottom: 32px;
}

.ticket-details {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

@media (min-width: 768px) {
    .ticket-details {
        gap: 48px;
    }
}

.ticket-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ticket-detail-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.ticket-detail-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: white;
}

/* Ticket Stub */
.ticket-stub {
    position: relative;
    padding: 24px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: rgba(26, 42, 58, 0.95);
    border-top: 2px dashed rgba(201, 169, 97, 0.3);
    z-index: 1;
}

@media (min-width: 768px) {
    .ticket-stub {
        width: 200px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        padding: 32px;
        border-top: none;
        border-left: 2px dashed rgba(201, 169, 97, 0.3);
    }
}

/* Perforation notches */
.ticket-notch {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--bg-primary);
    border-radius: 50%;
}

.ticket-notch-top {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
}

.ticket-notch-bottom {
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
}

@media (min-width: 768px) {
    .ticket-notch-top {
        top: 50%;
        left: -12px;
        transform: translateY(-50%) translateY(-100px);
    }
    .ticket-notch-bottom {
        top: 50%;
        left: -12px;
        bottom: auto;
        transform: translateY(-50%) translateY(100px);
    }
}

.ticket-barcode {
    width: 80px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    background-image: repeating-linear-gradient(90deg, transparent, transparent 2px, #1a2a3a 2px, #1a2a3a 4px);
    border-radius: 2px;
    opacity: 0.8;
}

@media (min-width: 768px) {
    .ticket-barcode {
        width: 100%;
        height: 48px;
        margin-bottom: 8px;
    }
}

.ticket-admit {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.ticket-stub-details {
    display: flex;
    gap: 24px;
}

@media (min-width: 768px) {
    .ticket-stub-details {
        flex-direction: column;
        gap: 16px;
        margin-top: auto;
    }
}

.ticket-stub-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ticket-stub-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.ticket-stub-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ticket-gold);
}

.ticket-stub-value.white {
    color: white;
}

/* Ticket action area */
.reveal-action {
    text-align: center;
    margin-top: 40px;
}

.reveal-message {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--text-muted);
}

/* ================================ */
/* Stage 4: Final Celebration       */
/* ================================ */
.final-container {
    width: 100%;
    max-width: 700px;
    padding: 20px;
    text-align: center;
}

.final-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.final-subtitle {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Stacked tickets */
.tickets-stack {
    position: relative;
    width: 100%;
    max-width: 520px;
    height: 280px;
    margin: 0 auto 48px;
    perspective: 1000px;
}

@media (min-width: 640px) {
    .tickets-stack {
        height: 320px;
    }
}

.ticket-mini {
    position: absolute;
    width: 100%;
    max-width: 480px;
    height: 180px;
    background: var(--paper);
    border-radius: 12px;
    box-shadow: 0 15px 35px -10px var(--paper-shadow);
    overflow: hidden;
    transition: transform var(--duration-slow) var(--ease-out);
    cursor: default;
}

@media (min-width: 640px) {
    .ticket-mini {
        height: 200px;
    }
}

.ticket-mini::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, var(--ticket-gold), var(--accent));
}

/* Notches for mini tickets */
.ticket-mini-notch {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--bg-primary);
    border-radius: 50%;
}

.ticket-mini-notch-left {
    left: -10px;
}

.ticket-mini-notch-right {
    right: -10px;
}

.ticket-mini:first-child {
    left: 50%;
    transform: translateX(-50%) translateX(-20px) rotate(-6deg);
    z-index: 1;
}

.ticket-mini:last-child {
    left: 50%;
    transform: translateX(-50%) translateX(20px) rotate(4deg);
    z-index: 2;
}

.tickets-stack:hover .ticket-mini:first-child {
    transform: translateX(-50%) translateX(-50px) rotate(-10deg);
}

.tickets-stack:hover .ticket-mini:last-child {
    transform: translateX(-50%) translateX(30px) rotate(6deg);
}

.ticket-mini-content {
    height: 100%;
    display: flex;
    padding: 20px 20px 20px 28px;
}

@media (min-width: 640px) {
    .ticket-mini-content {
        padding: 24px 24px 24px 32px;
    }
}

.ticket-mini-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 2px dashed var(--border-light);
    padding-right: 20px;
}

.ticket-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ticket-mini-tour {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
}

.ticket-mini-icon .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-muted);
    opacity: 0.4;
}

.ticket-mini-artist {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 400;
    color: var(--text-primary);
    margin: 8px 0;
}

.ticket-mini-details {
    display: flex;
    gap: 20px;
}

.ticket-mini-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ticket-mini-label {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ticket-mini-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ticket-mini-stub {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 16px;
}

@media (min-width: 640px) {
    .ticket-mini-stub {
        width: 100px;
    }
}

.ticket-mini-qr {
    width: 48px;
    height: 48px;
    background: var(--text-primary);
    border-radius: 4px;
    margin-bottom: 8px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 2px;
    padding: 4px;
}

.ticket-mini-qr span {
    background: white;
}

.ticket-mini-seat {
    text-align: center;
}

.ticket-mini-seat-label {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ticket-mini-seat-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}

/* Love message */
.love-message {
    font-family: var(--font-script);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    color: var(--accent);
    margin-bottom: 16px;
}

.countdown-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--text-muted);
}

/* Confetti container */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

/* ================================ */
/* Mobile Optimizations             */
/* ================================ */
@media (max-width: 480px) {
    .stage {
        padding: 16px;
    }

    .motion-toggle {
        top: 12px;
        right: 12px;
        padding: 8px 12px;
        font-size: 0.65rem;
    }

    .code-container,
    .greeting-container {
        padding: 24px;
    }

    .note-card {
        padding: 24px;
    }

    .note-seal {
        width: 40px;
        height: 40px;
        top: 16px;
        right: 16px;
    }

    .note-seal .material-symbols-outlined {
        font-size: 20px;
    }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
    .stage {
        padding-top: max(24px, env(safe-area-inset-top));
        padding-bottom: max(24px, env(safe-area-inset-bottom));
        padding-left: max(24px, env(safe-area-inset-left));
        padding-right: max(24px, env(safe-area-inset-right));
    }
}

/* ================================ */
/* Reduced Motion Preferences       */
/* ================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .texture-overlay,
    .paper-grain {
        display: none;
    }

    .note-card:hover {
        transform: rotate(1deg);
    }

    .tickets-stack:hover .ticket-mini:first-child {
        transform: translateX(-50%) translateX(-20px) rotate(-6deg);
    }

    .tickets-stack:hover .ticket-mini:last-child {
        transform: translateX(-50%) translateX(20px) rotate(4deg);
    }
}

/* Motion disabled via toggle */
.motion-disabled *,
.motion-disabled *::before,
.motion-disabled *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
}

.motion-disabled .texture-overlay,
.motion-disabled .paper-grain {
    display: none;
}

.motion-disabled .note-card:hover {
    transform: rotate(1deg);
}

.motion-disabled .tickets-stack:hover .ticket-mini:first-child {
    transform: translateX(-50%) translateX(-20px) rotate(-6deg);
}

.motion-disabled .tickets-stack:hover .ticket-mini:last-child {
    transform: translateX(-50%) translateX(20px) rotate(4deg);
}
