* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1;
}

.page {
    min-height: 100vh;
    position: relative;
    isolation: isolate;
}

.welcome-shell {
    min-height: calc(100vh - var(--nav-h, 56px));
    width: 100%;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 2.5rem);
    position: relative;
    z-index: 2;
}

.welcome-card {
    background: rgba(255, 255, 255, 0.95);
    padding: clamp(1.25rem, 4vw, 3rem);
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: min(100%, 600px);
    backdrop-filter: blur(10px);
    position: relative;
}

h1 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    line-height: 1.15;
    font-weight: bold;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Pattern lock embedded in welcome page */
.welcome-card .pattern-overlay {
    margin-top: clamp(1rem, 3vw, 2rem);
    position: relative;
    inset: auto;
    background: transparent;
    backdrop-filter: none;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: auto;
    opacity: 1;
}

.welcome-card .pattern-box {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.welcome-card .pattern-box h2 {
    color: #1d4f73;
    margin-bottom: clamp(1rem, 3vw, 2rem);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    text-align: center;
}

.welcome-card .pattern-container {
    margin: 0 auto;
}

@media (max-height: 620px) and (orientation: landscape) {
    .welcome-shell {
        align-items: start;
        padding-block: 0.75rem;
    }

    .welcome-card {
        padding-block: 1rem;
    }

    h1 {
        margin-bottom: 0.75rem;
    }
}
