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

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

.screen {
    width: 100%;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen.hidden {
    display: none;
}

.container {
    text-align: center;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 400px;
}

.logo {
    width: 120px;
    height: auto;
    margin-bottom: 1.25rem;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn {
    display: block;
    width: 100%;
    padding: 1.25rem;
    font-size: 1.25rem;
    font-weight: 600;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-checkin {
    background: #34a853;
    color: white;
}

.btn-checkout {
    background: #5f6368;
    color: white;
}

.btn-back {
    background: #1a73e8;
    color: white;
    margin-top: 2rem;
}

.link-small {
    display: inline-block;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #888;
    text-decoration: none;
}

.link-small:hover {
    color: #555;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Camera screen */
.camera-wrapper {
    position: fixed;
    inset: 0;
    background: #000;
}

#camera-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror front camera */
}

.camera-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}

.camera-status {
    color: white;
    font-size: 0.95rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.camera-hint {
    color: white;
    font-size: 1.15rem;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.camera-hint.hidden {
    display: none;
}

.btn-capture {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid white;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s;
}

.btn-capture:disabled {
    opacity: 0.4;
}

.btn-capture:active:not(:disabled) {
    background: rgba(255, 255, 255, 0.6);
}

.capture-ring {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    display: block;
}

/* Result card */
.result-card {
    background: white;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.result-card.success {
    border-top: 4px solid #34a853;
}

.result-card.checkout {
    border-top: 4px solid #ea4335;
}

.result-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.result-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.result-place {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.result-address {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.result-time {
    font-size: 0.9rem;
    color: #888;
}

.error-msg {
    color: #666;
    margin-top: 1rem;
    line-height: 1.5;
}
