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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #df231f;
    color: #fff;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.screen.active {
    display: flex;
}

.logo {
    max-width: 200px;
    height: auto;
}

h1 {
    font-size: 1.4rem;
    font-weight: 600;
}

input[type="file"] {
    display: none;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: #00a7b5;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    background: #008a96;
}

.btn-secondary {
    background: #fff;
    color: #df231f;
    border: none;
}

.btn-secondary:active {
    background: #f0f0f0;
}

.button-group {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: #00a7b5;
    border-radius: 6px;
    transition: width 0.15s;
}

#progress-text {
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
}

.result-photo {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

#qr-container {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    display: inline-block;
    margin: 0.5rem 0;
    width: min(80vw, 400px);
}

#qr-container img,
#qr-container canvas {
    width: 100% !important;
    height: auto !important;
}

.hint {
    font-size: 0.85rem;
    opacity: 0.6;
}
