.bottle-scan-page {
    padding-bottom: 2.5rem;
}

.bottle-scan-card {
    max-width: 48rem;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem 1.25rem 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.bottle-scan-title {
    font-size: 1.6rem;
    margin: 0 0 0.6rem;
    line-height: 1.3;
}

.bottle-scan-intro,
.bottle-scan-hint {
    color: #555;
    margin: 0 0 1rem;
}

.bottle-scan-status {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.45;
    margin: 0.65rem 0 0;
}

.bottle-scan-status:empty {
    display: none;
    margin: 0;
}

#bottle-scan-camera-status:not(:empty) {
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: #fff6f5;
    color: #8a2b26;
}

.bottle-scan-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.65rem;
}

.bottle-scan-reader {
    width: 100%;
    min-height: 220px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    border-radius: 8px;
    background: #111;
}

.bottle-scan-reader video {
    width: 100% !important;
}

.bottle-scan-camera-actions,
.bottle-scan-guide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.bottle-scan-camera-actions .btn {
    min-height: 44px;
}

.bottle-scan-identify {
    margin-top: 1.25rem;
    padding: 1rem 0 0;
    border-top: 1px solid #eee;
}

.bottle-scan-search-form {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.5rem;
}

.bottle-scan-search-form .form-control {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    margin: 0;
    border-radius: 8px;
}

.bottle-scan-search-submit {
    flex: 0 0 auto;
    height: 44px;
    padding: 0 1rem;
    border-radius: 8px;
    white-space: nowrap;
}

.bottle-scan-or {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0 0.75rem;
    color: #999;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bottle-scan-or::before,
.bottle-scan-or::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #eee;
}

.bottle-scan-browse-toggle {
    display: block;
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-weight: 600;
}

.bottle-scan-browse-toggle:hover,
.bottle-scan-browse-toggle:focus {
    border-color: var(--brand-primary, #d83a32);
    color: var(--brand-primary, #d83a32);
    background: #fff;
}

.bottle-scan-browse {
    margin-top: 1rem;
}

.bottle-scan-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.bottle-scan-cat {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    line-height: 1.2;
    color: #333;
}

.bottle-scan-cat.is-active,
.bottle-scan-cat[aria-pressed="true"] {
    background: var(--brand-primary, #d83a32);
    border-color: var(--brand-primary, #d83a32);
    color: #fff;
}

.bottle-scan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.bottle-scan-tile {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.bottle-scan-tile:hover,
.bottle-scan-tile:focus {
    border-color: var(--brand-primary, #d83a32);
    color: inherit;
}

.bottle-scan-tile img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    object-position: center;
    background: #f7f7f7;
    padding: 0.35rem;
}

.bottle-scan-tile-name,
.bottle-scan-tile-meta {
    display: block;
    padding: 0.35rem 0.45rem 0;
    font-size: 0.78rem;
    line-height: 1.3;
}

.bottle-scan-tile-name {
    font-weight: 600;
}

.bottle-scan-tile-meta {
    color: #777;
    padding-bottom: 0.45rem;
}

@media (min-width: 576px) {
    .bottle-scan-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .bottle-scan-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.bottle-scan-results {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.bottle-scan-results[hidden] {
    display: none;
}

.bottle-scan-result {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.6rem;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}

.bottle-scan-result:hover,
.bottle-scan-result:focus {
    border-color: var(--brand-primary, #d83a32);
    color: inherit;
}

.bottle-scan-result img {
    width: 48px;
    height: 72px;
    object-fit: contain;
    object-position: center;
    border-radius: 6px;
    background: #f7f7f7;
}

.bottle-scan-result-name {
    font-weight: 600;
}

.bottle-scan-result-meta {
    font-size: 0.85rem;
    color: #777;
}

.bottle-scan-generic {
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.bottle-scan-guide-hero {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.bottle-scan-guide-image {
    width: 88px;
    height: 132px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    background: #f7f7f7;
}

.bottle-scan-variant {
    margin: 0;
    color: #666;
}

.bottle-scan-dl {
    display: grid;
    gap: 0.55rem;
    margin: 0;
}

.bottle-scan-dl > div {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 0.4rem;
}

.bottle-scan-dl dt {
    margin: 0;
    color: #777;
    font-weight: 500;
}

.bottle-scan-dl dd {
    margin: 0;
}

.bottle-scan-guide-block p {
    margin: 0;
    white-space: pre-wrap;
}

.bottle-scan-guide-actions {
    margin-top: 1.5rem;
}

#camera {
    scroll-margin-top: 5.5rem;
}

.bottle-scan-camera {
    margin-bottom: 0;
}

.bottle-scan-camera .bottle-scan-section-title {
    margin-top: 0;
}
