@font-face {
    font-family: 'New York';
    src: url('NewYork.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --font: 'New York', Georgia, serif;
    --text: #1a1a1a;
    --text-muted: #8a8a8a;
    --focus: #2f6fed;
}

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

body {
    font-family: var(--font);
    background: #e8e8e8;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    color: var(--text);
}

.container {
    width: 100%;
    max-width: 28rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.title {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 1.125rem;
    font-weight: 400;
    letter-spacing: 0.15em;
}

.btn {
    font-family: var(--font);
    font-size: 0.8125rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(2.5rem) saturate(200%);
    -webkit-backdrop-filter: blur(2.5rem) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    appearance: none;
    padding: 0 2.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 0.5rem 2.5rem rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    height: 3.5rem;
    min-width: 14rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow:
        inset -10px -8px 0px -11px rgba(255, 255, 255, 1),
        inset 0 4px 20px rgba(255, 255, 255, 0.3);
    filter: blur(1px) brightness(115%);
    pointer-events: none;
}

.btn:hover { background: rgba(255, 255, 255, 0.25); }
.btn.hidden { display: none; }
.actions.hidden { display: none; }
.btn:focus-visible,
.file-input:focus-visible + .btn,
.icon:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 4px;
}

.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.camera {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    min-height: 3.5rem;
}

.camera.active { display: flex; }

.stream {
    aspect-ratio: 4 / 3;
    display: block;
    width: 100%;
    max-width: 20rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1);
}

.controls { display: flex; gap: 1.5rem; justify-content: center; }

.receipt-result {
    max-width: 20rem;
    color: var(--text-muted);
    font-family: Georgia, serif;
    font-size: 0.875rem;
    line-height: 1.45;
    text-align: left;
    white-space: pre-wrap;
}

.icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(2rem) saturate(180%);
    -webkit-backdrop-filter: blur(2rem) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    appearance: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text);
}

.icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .icon {
        transition: none;
    }
}
