/* BROL Chantier: the website's paper, ink and yellow (../site.css), with a building site's tape. */
@font-face { font-family: "Passion One"; src: url(../fonts/PassionOne-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
:root {
  --paper: #eeeade; --card: #f7f4ec; --panel: #e5e0d4; --rule: #c6c1b5; --ink: #242521; --small: #55574e;
  --yellow: #ffd43e; --red: #ac3827; --green: #3d6b37; --steel: #304e47; --focus: #168473;
  --display: "Passion One", Impact, "Arial Black", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tape: repeating-linear-gradient(-45deg, var(--yellow) 0 10px, var(--ink) 10px 20px);
  --tabs: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.5 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.camera-open { overflow: hidden; }
button, a, input, select { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--steel); text-underline-offset: 3px; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
sup { font-size: .45em; vertical-align: .9em; margin-left: .05em; }

/* The preview's bar (?mock=1) */
.preview { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 16px; background: var(--ink); color: var(--paper); font-size: .78rem; border-bottom: 4px solid transparent; border-image: var(--tape) 4; }
.preview b { color: var(--yellow); text-transform: uppercase; letter-spacing: .1em; }
.preview span { flex: 1 1 12rem; opacity: .85; }
.preview select { background: var(--paper); color: var(--ink); border: 0; border-radius: 2px; padding: 4px 6px; font-size: .8rem; max-width: 100%; }

/* The top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); background: rgba(238, 234, 222, .96); border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 0; min-height: 44px; }
.brand img { width: 84px; height: 25px; }
.brand span { font: 700 1.35rem/1 var(--display); letter-spacing: .01em; padding-bottom: 3px; border-bottom: 4px solid transparent; border-image: var(--tape) 4; }
.top-end { display: flex; align-items: center; gap: 4px; }
.menu-button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--ink); border-radius: 2px; background: var(--card); }
.langs { display: flex; gap: 2px; }
.langs button { min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--small); font: 650 .78rem var(--body); letter-spacing: .1em; }
.langs button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -3px var(--ink); }

main { max-width: 34rem; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left)); }
.project-footer { max-width: 34rem; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) calc(var(--tabs) + 32px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.project-footer p { border-top: 1px solid var(--rule); margin: 0; padding-top: 18px; color: var(--small); font-size: .85rem; }
.project-footer nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; margin-top: 8px; }
.project-footer a { display: flex; align-items: center; min-height: 44px; font-size: .82rem; overflow-wrap: anywhere; }
.project-footer a[aria-current] { color: var(--ink); font-weight: 700; }
.camera-open .project-footer { display: none; }
.screen { display: grid; gap: 18px; }
.screen > * { margin: 0; min-width: 0; }
.screen.center { min-height: 60vh; place-content: center; text-align: center; }
.title { font: 700 2.6rem/.95 var(--display); letter-spacing: -.01em; margin: 6px 0 0; }
.title:focus { outline: none; }
.lede { font-size: 1.05rem; margin: 8px 0 0; }
.kicker { margin: 0; font: 650 .72rem/1.4 var(--body); letter-spacing: .13em; text-transform: uppercase; color: var(--small); }
.small { font-size: .88rem; color: var(--small); margin: 8px 0 0; }
.empty { color: var(--small); margin: 8px 0 0; }
.facts { margin: 6px 0 0; color: var(--small); font-size: .92rem; }
.greet { margin: 0; font: 700 1.5rem/1.1 var(--display); }
.notice { margin: 0; padding: 12px 14px; background: var(--card); border: 1px solid var(--ink); border-left: 6px solid var(--steel); }
.notice.warn { border-left-color: var(--red); }
.error { margin: 6px 0 0; color: var(--red); font-weight: 600; min-height: 1.2em; }
.error:empty { display: none; }
.loader { display: grid; gap: 14px; justify-items: center; font-weight: 600; }
.loader .stripes { width: 120px; height: 14px; background: var(--tape); background-size: 28px 28px; animation: tape 1s linear infinite; }
@keyframes tape { to { background-position: 28px 0; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 18px; border: 1px solid var(--ink); border-radius: 2px; background: var(--card); color: var(--ink); font: 700 1rem/1.2 var(--body); text-decoration: none; text-align: center; box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.primary { background: var(--yellow); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: .9rem; }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger-text { color: var(--red); border-color: var(--red); }
.btn.discord .icon { width: 1.4em; height: 1.4em; }
.actions { display: grid; gap: 12px; }
.actions .btn { width: 100%; }
.link { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--steel); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 4px; }
.btn.shoot { width: 100%; min-height: 84px; background: var(--yellow); font: 700 2.1rem/1 var(--display); letter-spacing: .01em; text-transform: uppercase; box-shadow: 5px 5px 0 var(--ink); border-width: 2px; }
.btn.shoot .icon { width: 1.15em; height: 1.15em; stroke-width: 2.2; }

/* Cards: the week, the prize */
.card { position: relative; background: var(--card); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 14px 16px 16px; }
.tape { height: 12px; margin: -14px -16px 12px; background: var(--tape); border-bottom: 2px solid var(--ink); }
.week-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.week-head b { font: 700 1.7rem/1 var(--display); }
.week-head .count { margin-left: auto; font-size: .85rem; font-weight: 650; background: var(--ink); color: var(--paper); padding: 3px 8px; }
.week-head .frozen { flex-basis: 100%; text-align: right; font-size: .78rem; color: var(--small); }
.why-not { margin: 0; font-weight: 700; color: var(--red); }
.contest { margin-top: 12px; padding: 10px 12px; border-left: 4px solid var(--steel); background: var(--card); }
.contest p { margin: 0; font-size: .92rem; }
.score { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 10px; }
.score p { margin: 0; display: grid; }
.score .num { font: 700 4.4rem/.85 var(--display); letter-spacing: -.02em; }
.score .rank { text-align: right; }
.score .rank .num { font-size: 3rem; }
.score .unit { font-size: .85rem; color: var(--small); font-weight: 600; }
.prize { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; background: var(--yellow); border: 1px solid var(--ink); }
.prize p { margin: 0; font-weight: 700; }
.prize p.small { font-weight: 400; color: var(--ink); margin-top: 6px; }
.prize .icon { width: 1.6em; height: 1.6em; margin-top: 2px; }
.card.tip { display: grid; gap: 10px; box-shadow: none; border-width: 1px; }
.card.tip p { margin: 0; font-size: .92rem; }
.card.tip .btn { justify-self: start; }

/* Welcome */
.welcome .hero { padding-top: 8px; }
.welcome .title { display: grid; gap: 4px; }
.welcome .title img { width: 170px; height: auto; }
.welcome .title span { font-size: 3.6rem; line-height: .9; }
.steps { margin: 0; padding: 0 0 0 1.4em; display: grid; gap: 6px; }
.steps li::marker { font: 700 1.1rem var(--display); }
.tip { border-left: 4px solid var(--yellow); padding-left: 10px; }

/* Forms */
.form { display: grid; gap: 6px; box-shadow: none; border-width: 1px; }
.form label[for] { font-weight: 700; }
.form input[type=text] { width: 100%; min-height: 52px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 2px; background: #fff; font-size: 1.15rem; }
.form .hint { margin: 0; font-size: .85rem; color: var(--small); }
.tick { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; font-weight: 600; cursor: pointer; }
.tick input { width: 26px; height: 26px; margin: 0; flex: none; accent-color: var(--ink); }
.form .btn { margin-top: 8px; }

/* Blocks of the home page */
.block { padding-top: 6px; border-top: 1px solid var(--rule); }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.block h2 { display: flex; align-items: center; gap: 8px; margin: 6px 0; font: 700 1.5rem/1.1 var(--display); }
.more summary { cursor: pointer; font: 700 1.25rem/1.2 var(--display); padding: 10px 0; min-height: 44px; list-style-position: inside; }
.list { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; font-size: .95rem; }

/* Photos */
.strip { list-style: none; margin: 0; padding: 0 0 6px; display: grid; grid-auto-flow: column; grid-auto-columns: 31%; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
.strip li { scroll-snap-align: start; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tile { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 1px solid var(--ink); background: var(--panel); overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .chip { position: absolute; left: 4px; bottom: 4px; max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .pts { position: absolute; right: 4px; top: 4px; font: 700 1.05rem/1 var(--display); background: var(--card); border: 1px solid var(--ink); padding: 3px 5px 2px; }
.chip { display: inline-block; padding: 2px 6px; font: 700 .68rem/1.4 var(--body); letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--ink); background: var(--card); color: var(--ink); }
.chip.pending, .chip.sending, .chip.r-pending { background: var(--yellow); }
.chip.accepted, .chip.r-confirmed, .chip.r-fixed { background: var(--green); color: #fff; border-color: var(--green); }
.chip.rejected, .chip.r-invalid { background: var(--red); color: #fff; border-color: var(--red); }
.chip.review, .chip.r-duplicate { background: var(--steel); color: #fff; border-color: var(--steel); }
.chip.spot { background: var(--yellow); }
.photos .btn.shoot { margin-top: 24px; }
/* The map of the places to redo */
.map-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.map-tools .seg button { min-height: 42px; font-size: .9rem; }
.map-slot { height: min(62vh, 34rem); border: 2px solid var(--ink); background: var(--panel); }
.map-box { width: 100%; height: 100%; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .85rem; color: var(--small); }
/* The game's map, where photos count: the zone's colour on the map, as a swatch. */
.swatch { display: inline-block; flex: none; width: 18px; height: 12px; border: 2px solid #e0a800; background: rgba(224, 168, 0, .16); vertical-align: -1px; }
.zone-line { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; background: var(--card); border: 1px solid var(--rule); border-left: 6px solid #e0a800; font-weight: 700; }
/* The priority zones: yellow hatching inside a yellow and black tape, like the map draws them. */
.swatch.prio { border: 3px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--yellow) 0 4px, var(--ink) 4px 8px) 3; background: repeating-linear-gradient(-45deg, var(--yellow) 0 2px, transparent 2px 5px); }
.zone-line.prio { background: #fff4c8; border-left-color: var(--ink); }
.priority-line { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.chip.prio { background: var(--yellow); border-style: dashed; }
.priority-label { padding: 3px 8px; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); font: 700 .8rem/1.2 var(--body); white-space: nowrap; pointer-events: none; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); vertical-align: -1px; }
.dot.open, .chip.s-open { background: var(--yellow); }
.dot.photographed { background: var(--green); }
.dot.redone { background: #8a8c86; }
.chip.s-photographed { background: var(--green); color: #fff; border-color: var(--green); }
.chip.s-redone { background: #8a8c86; color: #fff; border-color: #8a8c86; }
.spots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.spot-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; width: 100%; padding: 6px; text-align: left; background: var(--card); border: 1px solid var(--rule); }
.spot-row img { width: 96px; height: 54px; object-fit: cover; background: var(--panel); border: 1px solid var(--ink); }
.spot-row b { display: block; font-size: .95rem; }
.spot-row small { color: var(--small); font-size: .8rem; }
.frame { margin: 0; }
.frame figcaption { font: 650 .7rem/1.4 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--small); margin-top: 4px; }
/* A photo this phone no longer has: what the foreman read in it, as its card. */
.tile.card-tile { background: var(--card); }
.reading-face { position: absolute; inset: 0; display: grid; align-content: start; gap: 4px; padding: 8px 8px 28px; text-align: left; border-top: 10px solid var(--swatch, var(--rule)); }
.reading-face b { font: 700 .95rem/1.05 var(--display); padding-right: 36px; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reading-face small { font-size: .68rem; line-height: 1.25; color: var(--small); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.reading { padding: 10px 12px; background: var(--card); border: 1px solid var(--rule); border-left: 10px solid var(--swatch, var(--rule)); }
.reading p { margin: 4px 0 0; }
.reading .reading-title { margin: 0; font: 700 1.35rem/1.1 var(--display); }
.card.waiting { display: grid; gap: 6px; box-shadow: none; border-width: 1px; border-left: 8px solid var(--yellow); }
.card.waiting p { margin: 0; }
.card.waiting .btn { justify-self: start; }
.sheet-card .actions { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); margin-top: 12px; }

/* Reports */
.reports { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.report { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "code chip pts" "what what what"; align-items: center; gap: 2px 10px; padding: 8px 10px; background: var(--card); border: 1px solid var(--rule); }
.report .code { grid-area: code; font: 700 1.05rem/1 var(--display); letter-spacing: .02em; }
.report .what { grid-area: what; font-size: .85rem; color: var(--small); }
.report .chip { grid-area: chip; justify-self: start; }
.report .pts { grid-area: pts; font: 700 1.2rem/1 var(--display); }

/* The board */
.back { margin-bottom: -8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); }
.seg button { min-height: 46px; border: 0; background: var(--card); font-weight: 700; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg button:disabled { color: var(--small); cursor: default; opacity: .6; }
.week-line { margin: 0; }
.week-line b { font: 700 1.25rem var(--display); }
.rows { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.row { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 8px; border-bottom: 1px solid var(--rule); }
.row .rank { font: 700 1.5rem/1 var(--display); text-align: center; }
.row:first-child .rank { background: var(--yellow); border: 1px solid var(--ink); padding: 4px 0 2px; }
.row .who { display: grid; min-width: 0; }
.row .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.02rem; }
.row .who em { font-style: normal; font: 700 .68rem/1.4 var(--body); text-transform: uppercase; letter-spacing: .08em; justify-self: start; background: var(--ink); color: var(--paper); padding: 0 6px; margin: 2px 0; }
.row .who small { color: var(--small); font-size: .8rem; }
.row .pts { font: 700 1.6rem/1 var(--display); }
.row.you { background: var(--yellow); border: 2px solid var(--ink); }
.gap { text-align: center; color: var(--small); padding: 4px; }

/* The tabs */
.tabs { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left)); background: var(--ink); color: var(--paper); border-top: 4px solid transparent; border-image: var(--tape) 4; }
.tabs button { display: grid; justify-items: center; gap: 2px; min-width: 0; min-height: var(--tabs); padding: 8px 0 6px; border: 0; background: none; color: #cfcab9; font: 650 .7rem/1.1 var(--body); white-space: nowrap; }
.tabs button .icon { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--yellow); }
.tabs .tab-shoot { color: var(--ink); }
.tabs .tab-shoot .icon { width: 54px; height: 54px; padding: 12px; margin-top: -26px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%; box-shadow: 0 0 0 3px var(--ink); stroke-width: 2.2; }
.tabs .tab-shoot span { color: var(--yellow); }
.tabs button:focus-visible { outline-color: var(--yellow); outline-offset: -3px; }

/* Toasts and the foreman */
.toasts { position: fixed; z-index: 60; top: calc(66px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(30rem, calc(100% - 32px)); display: grid; gap: 8px; pointer-events: none; }
.toast { margin: 0; padding: 10px 12px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: .95rem; line-height: 1.35; border-left: 8px solid var(--yellow); box-shadow: 3px 3px 0 rgba(0, 0, 0, .25); animation: drop .25s ease-out; transition: opacity .4s, transform .4s; }
.toast.good { border-left-color: #7bc96f; }
.toast.bad { border-left-color: #e5484d; }
.toast.going { opacity: 0; transform: translateY(-8px); }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }
.foreman { position: fixed; z-index: 55; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs) + 22px + env(safe-area-inset-bottom)); width: min(30rem, calc(100% - 32px)); display: flex; gap: 8px; align-items: flex-start; padding: 12px 8px 12px 14px; background: var(--card); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); animation: drop .25s ease-out; }
.foreman p { margin: 0; flex: 1; }
.foreman b { display: block; font: 700 1.05rem/1.2 var(--display); }
/* Over the viewfinder: the foreman under the pills, the toasts above the shutter. */
.camera-open .foreman { bottom: auto; top: calc(70px + env(safe-area-inset-top)); z-index: 120; padding: 8px 6px 8px 12px; font-size: .9rem; }
.camera-open .toasts { z-index: 110; top: auto; bottom: calc(200px + env(safe-area-inset-bottom)); }
.close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -4px -8px 0; border: 0; background: none; }

/* The sheet */
.sheet { position: fixed; inset: 0; z-index: 80; display: grid; align-items: end; }
.sheet-back { position: absolute; inset: 0; background: rgba(36, 37, 33, .55); }
.sheet-card { position: relative; width: min(34rem, 100%); max-height: 90dvh; overflow: auto; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: var(--paper); border-top: 6px solid transparent; border-image: var(--tape) 6; animation: rise .22s ease-out; }
.sheet-card:focus { outline: none; }
.sheet-card .close { position: absolute; top: 8px; right: 8px; margin: 0; }
.sheet-card h2 { margin: 0 44px 12px 0; font: 700 1.5rem/1.1 var(--display); }
.sheet-card .large { display: block; width: 100%; max-height: 52dvh; object-fit: contain; background: var(--ink); border: 1px solid var(--ink); }
.sheet-card .menu { display: grid; gap: 10px; }
.sheet-card .menu .btn { width: 100%; justify-content: flex-start; }
.confirm { margin-top: 12px; padding: 12px; border: 2px solid var(--red); background: var(--card); }
.confirm p { margin: 0 0 10px; }
.confirm .actions { grid-template-columns: 1fr 1fr; }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
/* A photo full screen, to show it by sharing the screen: the photo alone, on black. */
.viewer { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: #000; }
.viewer:focus { outline: none; }
.viewer img { width: 100%; height: 100%; object-fit: contain; }
.viewer .cam-round { position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }

/* The viewfinder */
.camera { position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; overflow: hidden; height: 100dvh; }
.camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.on { animation: flash .35s ease-out; }
@keyframes flash { from { opacity: .85; } to { opacity: 0; } }
.cam-top { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 28px max(12px, env(safe-area-inset-left)); background: linear-gradient(rgba(0, 0, 0, .6), transparent); }
.cam-round { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .5); color: #fff; }
.cam-round .icon { width: 26px; height: 26px; }
.cam-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 7px; margin: 0; min-height: 36px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font: 700 .85rem/1 var(--body); white-space: nowrap; }
.pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #bbb; flex: none; }
.pill[data-state="ok"]::before, .pill[data-state="sim"]::before { background: #6ddf5f; }
.pill[data-state="poor"]::before, .pill[data-state="stale"]::before, .pill[data-state="outside"]::before { background: var(--yellow); }
.pill[data-state="denied"]::before, .pill[data-state="off"]::before, .pill[data-state="military"]::before, .pill[data-state="school"]::before, .pill[data-state="optout"]::before { background: #ff5a4f; }
.pill[data-state="sensitive"]::before { background: var(--yellow); }
.pill[data-state="looking"]::before { animation: blink 1s infinite; }
.pill-button { border: 1px solid rgba(255, 255, 255, .6); min-height: 40px; }
.pill-button::before { display: none; }
#cam-heading::before { display: none; }
@keyframes blink { 50% { opacity: .2; } }
.cam-panels { position: absolute; z-index: 2; top: calc(max(12px, env(safe-area-inset-top)) + 58px); left: 12px; right: 12px; display: grid; gap: 8px; }
.cam-why { margin: 0; padding: 10px 12px; background: rgba(0, 0, 0, .7); border-left: 5px solid var(--yellow); font-size: .92rem; display: grid; gap: 8px; justify-items: start; }
.cam-why p { margin: 0; }
.cam-why .btn { color: var(--ink); }
.pill[data-state="offmap"]::before { background: var(--yellow); }
.pill[data-state="priority"] { background: rgba(36, 37, 33, .85); box-shadow: inset 0 0 0 2px var(--yellow); }
.pill[data-state="priority"]::before { width: 12px; height: 12px; border-radius: 2px; background: repeating-linear-gradient(-45deg, var(--yellow) 0 3px, var(--ink) 3px 6px); }
/* On a place to redo: the game's frame over the viewfinder, and the way to aim. */
.cam-ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; opacity: .4; }
.cam-spot { padding: 8px 12px 10px; background: rgba(0, 0, 0, .66); border-left: 5px solid var(--yellow); font-size: .9rem; }
.cam-spot p, .cam-spot label { margin: 4px 0 0; display: flex; align-items: center; gap: 8px; }
.cam-spot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cam-spot-head .link { color: #fff; min-height: 36px; padding: 4px 0; }
.cam-spot-aim { font-weight: 700; font-size: 1rem; }
.cam-spot-level { font-weight: 700; }
.arrow { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-weight: 900; transition: transform .2s; }
.cam-spot input[type=range] { flex: 1; accent-color: var(--yellow); min-height: 32px; }
.cam-middle { position: absolute; z-index: 2; top: 50%; left: 16px; right: 16px; transform: translateY(-50%); margin: 0; padding: 16px; text-align: center; background: rgba(0, 0, 0, .7); font-weight: 600; }
.cam-middle.problem { display: grid; gap: 12px; justify-items: center; }
.cam-middle.problem p { margin: 0; }
.cam-bottom { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; justify-items: center; gap: 10px; padding: 40px max(16px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: linear-gradient(transparent, rgba(0, 0, 0, .75) 45%); }
.cam-status { margin: 0; min-height: 1.4em; max-width: 26rem; text-align: center; font-weight: 600; text-shadow: 0 1px 3px #000; }
.cam-bottom .btn { color: var(--ink); }
.cam-row { width: 100%; max-width: 26rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.cam-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cam-thumb { position: relative; width: 54px; height: 54px; flex: none; border: 2px solid #fff; background: #333 center/cover no-repeat; }
.cam-thumb[data-state="sending"]::after, .cam-thumb[data-state="blurring"]::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.cam-thumb[data-state="sent"] { border-color: #6ddf5f; }
.cam-thumb[data-state="failed"] { border-color: #ff5a4f; }
.cam-count { font-size: .78rem; font-weight: 700; text-shadow: 0 1px 2px #000; }
.shutter { position: relative; width: 84px; height: 84px; border-radius: 50%; border: 5px solid #fff; background: transparent; padding: 0; display: grid; place-items: center; }
.shutter span { width: 64px; height: 64px; border-radius: 50%; background: var(--yellow); transition: transform .15s, opacity .2s; }
.shutter:active span { transform: scale(.88); }
.shutter[aria-disabled="true"] span { opacity: .4; }
.shutter.cooling span { animation: cool 4s linear; }
.shutter:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
@keyframes cool { from { transform: scale(.55); opacity: .5; } to { transform: scale(1); opacity: 1; } }

@media (min-width: 40rem) {
  .title { font-size: 3.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
