.web-client { background: var(--color-canvas); --color-text-muted: #625d70; --color-danger: #b7294a; }
.web-client [hidden] { display: none!important; }
.web-client .bottom-nav a { color: var(--color-text-muted); }
.web-client .bottom-nav a.active { color: var(--color-brand); }
.web-client a { color: var(--color-brand); text-decoration: none; }
.web-client :where(a,button,input,select,[tabindex]:not([tabindex="-1"])):focus-visible { outline: 3px solid #6757d9; outline-offset: 4px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 2000; padding: 14px 20px; border-radius: 10px; background: white; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.web-client .screen-scroll { scrollbar-width: auto; }
.web-client .screen-scroll::-webkit-scrollbar { display: initial; }
.web-client ul.web-image-grid,.web-client ul.web-recent-grid { list-style: none; padding: 0; margin: 0; }
.web-client .web-header { flex-wrap: wrap; }
.web-client .web-header nav a { display: inline-flex; align-items: center; min-height: 44px; }
.web-library { height: 100svh; overflow-y: auto; padding-bottom: 95px; }
.web-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; background: #fff; border-bottom: 1px solid var(--color-border); }
.web-brand { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 800; color: var(--color-text)!important; }
.web-brand img { width: 40px; height: 40px; border-radius: 12px; }
.web-header nav { display: none; gap: 32px; }
.web-header nav a[aria-current=page] { font-weight: 750; }
.web-library-body { max-width: 1500px; padding: 24px 20px; margin: auto; }
.web-intro { padding: 16px 0 22px; }
.eyebrow { color: var(--color-brand); font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.web-intro h1 { font-size: clamp(30px,4vw,50px); letter-spacing: -.04em; margin: 10px 0; line-height: 1.1; }
.web-intro p:not(.eyebrow),.web-detail p { color: var(--color-text-muted); line-height: 1.6; }
.web-search { max-width: 780px; margin-bottom: 16px; }
.web-search label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.web-search>div { display: flex; gap: 8px; }
.web-search input { width: 100%; min-width: 0; padding: 15px 18px; border: 1px solid var(--color-border); border-radius: 14px; background: white; }
.web-difficulty-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 28px; }
.web-difficulty-label { font-size: 13px; font-weight: 650; color: var(--color-text-muted); }
.web-difficulty-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.web-difficulty-btn { min-height: 40px; padding: 8px 16px; border: 1px solid var(--color-border); border-radius: 999px; background: #fff; color: var(--color-text); font-size: 13px; font-weight: 650; cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
.web-difficulty-btn:hover { background: var(--color-brand-soft); border-color: var(--color-brand); color: var(--color-brand); }
.web-difficulty-btn.active { background: var(--color-brand); border-color: var(--color-brand); color: #fff; }
.web-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 20px; border: 1px solid var(--color-brand); border-radius: 13px; background: var(--color-brand); color: white!important; font-weight: 700; cursor: pointer; text-align: center; }
.web-button.secondary { background: white; color: var(--color-brand)!important; border-color: var(--color-border); }
.web-button:disabled { opacity: .6; cursor: wait; }
.web-header .web-button { padding: 10px 12px; font-size: 12px; }
.web-catalog aside h2,.category-links { display: none; }
.mobile-category { display: flex; align-items: center; gap: 12px; font-weight: 600; margin-bottom: 24px; }
.mobile-category select { min-width: 0; flex: 1; padding: 12px; border: 1px solid var(--color-border); border-radius: 12px; background: white; }
.web-results-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.web-results-heading h2 { margin: 0; font-size: 20px; }
.web-results-heading span { color: var(--color-text-muted); font-size: 12px; white-space: nowrap; }
.web-category-intro { margin: -8px 0 18px; color: var(--color-text-muted); font-size: 14px; line-height: 1.55; max-width: 72ch; }
.web-detail-meta a { color: var(--color-brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.web-image-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(145px,1fr)); gap: 16px; }
.web-image-grid > li, .web-image-grid > div { contain: layout style; }
.web-image-grid .image-card { min-width: 0; }
.web-load-more { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 28px 0 8px; text-align: center; }
.web-load-more-status { margin: 0; color: var(--color-text-muted); font-size: 13px; font-weight: 600; }
.web-error { padding: 18px; background: #fff0f3; border-radius: 14px; margin: 16px 0; }
.web-error button { margin-left: 12px; padding: 8px; }
.web-recents { margin: 24px 0; }
.web-recents h2 { font-size: 18px; }
.web-recents small { font-size: 12px; color: var(--color-text-muted); font-weight: 400; }
.web-recent-grid { display: flex; overflow: auto; gap: 12px; }
.web-photo-card { flex: 0 0 160px; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--color-border); border-radius: 18px; background: white; }
.web-recent-grid img { display: block; width: 100%; height: 134px; object-fit: contain; border-radius: 10px; }
.web-photo-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.web-photo-download,.web-photo-delete { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px; border: 1px solid var(--color-border); border-radius: 10px; background: white; color: var(--color-brand); font-size: 12px; font-weight: 650; cursor: pointer; }
.web-photo-download:hover { background: var(--color-brand-soft); }
.web-photo-download:disabled { opacity: .55; cursor: wait; }
.web-photo-delete { color: var(--color-danger); background: #fff7f8; border-color: #f1dce1; }
.web-photo-delete:hover { background: #ffedf0; }
.web-photo-delete svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.web-detail-page { height: 100svh; overflow: auto; background: var(--color-canvas); }
.web-detail-header { display: none; }
.web-detail { padding: 24px; }
.web-back { display: block; width: 100%; max-width: 1200px; min-height: 44px; margin: 0 auto 24px; padding: 0; border: 0; text-align: left; background: transparent; color: var(--color-brand); cursor: pointer; }
.web-detail-grid { max-width: 1200px; margin: auto; }
.web-detail-preview { background: white; border: 1px solid var(--color-border); border-radius: 24px; padding: 24px; aspect-ratio: 1; display: grid; place-items: center; }
.web-detail-preview img { display: block; width: 100%; height: 100%; min-height: 0; max-height: 50svh; object-fit: contain; }
.web-detail h1 { font-size: 36px; letter-spacing: -.03em; }
.web-detail small { display: block; color: var(--color-text-muted); line-height: 1.5; margin: 20px 0; }
.web-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.web-message { padding: 40px; text-align: center; }
.web-client .ar-container { background: #000; }
.browser-camera { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; }
.browser-camera-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
.web-client .ar-back-button, .web-client .ar-mode-chip, .web-client .ar-status, .web-client .ar-settings-sheet, .web-client .ar-tool-dock { backdrop-filter: none; -webkit-backdrop-filter: none; }
.web-client .ar-tool-dock { background: rgba(18, 18, 23, 0.92); }
.web-client .ar-back-button, .web-client .ar-mode-chip, .web-client .ar-status { background: rgba(18, 18, 23, 0.86); }
.camera-error { position: absolute; top: 80px; left: 20px; right: 20px; z-index: 20; background: #fff; color: #222; padding: 18px; border-radius: 16px; text-align: center; }
.camera-error-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.camera-error button { min-height: 44px; padding: 10px 18px; background: var(--color-brand); color: white; border: 1px solid var(--color-brand); border-radius: 10px; font-weight: 650; cursor: pointer; }
.camera-error .camera-error-dismiss { background: #fff; color: var(--color-text); border-color: var(--color-border); }
#blazor-error-ui { display: none; position: fixed; bottom: 0; padding: 20px; background: #fff0f3; width: 100%; z-index: 10000; }
.web-footer { max-width: 1500px; margin: 16px auto 0; padding: 16px 20px calc(104px + env(safe-area-inset-bottom)); border-top: 1px solid var(--color-border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.web-footer-apps, .web-footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.web-footer-link { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--color-text-muted); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.web-prose { max-width: 780px; margin: 0 auto; padding: 32px 20px 24px; color: var(--color-text); line-height: 1.65; }
.web-prose h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.03em; margin: 8px 0 12px; line-height: 1.15; }
.web-prose h2 { font-size: 20px; margin: 28px 0 10px; letter-spacing: -.01em; }
.web-prose h3 { font-size: 16px; margin: 18px 0 6px; }
.web-prose p, .web-prose li { color: var(--color-text-muted); font-size: 15px; }
.web-prose strong { color: var(--color-text); }
.web-prose code { padding: 2px 6px; border-radius: 6px; background: var(--color-surface-soft); color: var(--color-text); font-size: 13px; }
.web-prose a { color: var(--color-brand); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.web-prose-meta { font-size: 14px!important; margin-bottom: 24px; }
.web-prose-card { background: #fff; border: 1px solid var(--color-border); border-radius: 20px; padding: 20px 24px; margin: 20px 0 28px; }
.web-prose-card h2 { margin-top: 0; }
.web-prose-card ul { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.web-back-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; }
.web-footer-link:hover { color: var(--color-brand); }
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: calc(82px + env(safe-area-inset-bottom)); z-index: 1500; max-width: 780px; margin: 0 auto; padding: 18px 20px; border: 1px solid var(--color-border); border-radius: 20px; background: #fff; color: var(--color-text); box-shadow: 0 18px 48px rgba(27, 25, 35, 0.18); display: flex; flex-direction: column; gap: 14px; }
.cookie-banner h2 { margin: 0 0 6px; font-size: 16px; line-height: 1.3; }
.cookie-banner p { margin: 0; color: var(--color-text-muted); font-size: 13px; line-height: 1.5; }
.cookie-banner-status { margin-top: 8px!important; color: var(--color-text)!important; }
.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cookie-banner-actions .web-button { flex: 1 1 150px; min-height: 44px; padding: 10px 16px; font-size: 14px; }
.cookie-banner-close { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--color-text-muted); font-size: 13px; font-weight: 650; cursor: pointer; }
@media(min-width:1024px) {
    .web-footer { padding: 16px 40px 28px; }
    .cookie-banner { bottom: 24px; flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 24px; }
    .cookie-banner-actions { flex-shrink: 0; justify-content: flex-end; }
    .cookie-banner-actions .web-button { flex: 0 0 auto; }
    .web-library { padding-bottom: 24px; }
    .web-header { padding: 20px max(32px,calc((100vw - 1452px)/2)); }
    .web-header nav { display: flex; }
    .web-header .web-button { font-size: 14px; padding: 12px 20px; }
    .web-library-body { padding: 30px 40px; }
    .web-catalog { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 44px; }
    .web-catalog aside h2 { display: block; margin: 0 0 18px; font-size: 18px; }
    .category-links { display: flex; flex-direction: column; gap: 5px; }
    .category-links a { display: flex; justify-content: space-between; padding: 11px 14px; border-radius: 10px; color: var(--color-text); font-size: 14px; }
    .category-links a[aria-current=page] { background: var(--color-brand-soft); color: var(--color-brand); font-weight: 750; }
    .category-links span { color: var(--color-text-muted); font-size: 12px; }
    .mobile-category { display: none; }
    .web-image-grid { grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 22px; }
    .web-library .bottom-nav { display: none; }
    .web-detail-header { display: block; }
    .web-detail { padding: 40px; }
    .web-detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 60px; }
    .web-detail-preview img { max-height: 72svh; }
    .web-actions .ar-action { background: white; color: var(--color-brand)!important; }
}
@media (pointer: coarse) {
    .web-client .web-photo-download,.web-client .web-photo-delete,.web-client .favorite-btn,.web-client .web-difficulty-btn { min-height: 44px; min-width: 44px; }
}
@media (forced-colors: active) {
    .web-client :where(a,button,input,select,[tabindex]:not([tabindex="-1"])):focus-visible { outline-color: Highlight; }
    .web-client button,.web-client .web-button,.web-client .image-card-main,.web-client .cookie-banner { border-color: ButtonText; }
}
