html, body { margin: 0; min-height: 100%; background: #F7F8FA; }
body { padding-bottom: env(safe-area-inset-bottom); }
:focus-visible { outline: 3px solid #0B5D7A; outline-offset: 2px; }

/* Start-up splash (shown until WebAssembly is ready) */
.mc-splash { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-family: system-ui, sans-serif; color: #0B3C5D; }
.mc-splash-name { font-size: 1.4rem; font-weight: 600; }
.mc-splash-bar { width: 160px; height: 4px; background: #dfe6ea; border-radius: 2px; overflow: hidden; }
.mc-splash-bar span { display: block; height: 100%; background: #0B5D7A; width: calc(var(--blazor-load-percentage, 10%)); transition: width .2s; }

/* Condition picker: large tap targets */
.mc-conditions { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-cond { min-height: 40px; min-width: 72px; padding: 0 12px; border-radius: 20px; border: 1px solid #b9c4cc; background: #fff; color: #1f2a30; font: inherit; cursor: pointer; }
.mc-cond:disabled { opacity: .6; cursor: default; }
.mc-cond.selected { color: #fff; border-color: transparent; }
.mc-cond-good.selected { background: #1B6E3A; }
.mc-cond-fair.selected { background: #1D5C96; }
.mc-cond-poor.selected { background: #8A5A00; }
.mc-cond-damaged.selected, .mc-cond-missing.selected { background: #B3261E; }
.mc-cond-notapplicable.selected { background: #5A6670; }

/* Thumbnails with sync badge */
.mc-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-thumb { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: #e7ecef; display: flex; align-items: center; justify-content: center; }
.mc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mc-thumb-status { position: absolute; inset-inline-end: 2px; bottom: 2px; background: rgba(255,255,255,.9); border-radius: 50%; display: flex; padding: 1px; }
.mc-thumb-kind { position: absolute; inset-inline-start: 2px; top: 2px; color: #fff; }
.mc-thumb-progress { position: absolute; left: 0; right: 0; bottom: 0; }
.mc-hash { font-size: .75rem; }

/* In-app camera */
.mc-camera { position: fixed; inset: 0; z-index: 2000; background: #000; display: flex; flex-direction: column; }
.mc-camera-video { flex: 1; width: 100%; height: 100%; object-fit: cover; }
.mc-camera-grid { position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(to right, rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.35) 1px, transparent 1px);
    background-size: 33.333% 33.333%; }
.mc-camera-label { position: absolute; top: env(safe-area-inset-top, 0); left: 0; right: 0; padding: 12px 16px; color: #fff; background: linear-gradient(rgba(0,0,0,.6), transparent); font-weight: 600; text-align: center; }
.mc-camera-error { position: absolute; top: 64px; left: 16px; right: 16px; }
.mc-camera-bar { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px 24px calc(16px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.mc-shutter { width: 72px; height: 72px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.25); cursor: pointer; }
.mc-shutter:active { background: #fff; }
.mc-shutter:disabled { opacity: .4; }

#blazor-error-ui { background: #fff3cd; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 3000; }

/* Room navigation list */
.mc-rooms { list-style: none; margin: 0; padding: 0; border-radius: 8px; overflow: hidden; }
.mc-rooms li + li { border-top: 1px solid #e3e8eb; }
.mc-room-link { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; color: inherit; text-decoration: none; }
.mc-room-link:hover { background: #f0f4f6; }
.mc-room-meta { font-size: .8rem; color: #5a6670; white-space: nowrap; }

/* Static sign-in (rendered by js/boot.js before .NET starts) */
.mc-static { max-width: 440px; margin: 32px auto; padding: 24px; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.15); font-family: system-ui, "Segoe UI", Tahoma, sans-serif; color: #1f2a30; }
.mc-static-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.2rem; color: #0B3C5D; margin-bottom: 16px; }
.mc-static h1 { font-size: 1.5rem; margin: 0 0 4px; font-weight: 500; }
.mc-static p { margin: 0 0 16px; line-height: 1.5; }
.mc-static form { display: flex; flex-direction: column; gap: 6px; }
.mc-static label { font-size: .9rem; color: #3d4a52; }
.mc-static input { font: inherit; font-size: 1.05rem; padding: 12px; border: 1px solid #8a979f; border-radius: 4px; }
.mc-static small { color: #4f5b62; margin-bottom: 8px; }
.mc-static-primary { margin-top: 12px; padding: 12px; font: inherit; font-weight: 600; color: #fff; background: #0B5D7A; border: 0; border-radius: 4px; cursor: pointer; text-transform: uppercase; letter-spacing: .03em; }
.mc-static-primary:disabled { opacity: .6; }
.mc-static-text { padding: 10px; font: inherit; color: #0B5D7A; background: none; border: 0; cursor: pointer; }
.mc-static-error { color: #B3261E; background: #fdecea; padding: 10px 12px; border-radius: 4px; margin-top: 12px !important; }
.mc-static-note { font-size: .8rem; color: #4f5b62; margin-top: 16px !important; }
.mc-static-lang { text-align: center; margin: 0 !important; }
.mc-static-lang a { color: #0B5D7A; }
