/* The Hive Studio app (/app). Phone first. */
html, body { margin: 0; background: var(--paper); }
body.appbody { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(72px + env(safe-area-inset-bottom)); font-family: var(--font-body); color: var(--ink); }
.app-top { position: sticky; top: 0; z-index: 5; background: var(--navy); color: var(--on-navy); padding: calc(10px + env(safe-area-inset-top)) 16px 10px; border-bottom: 4px solid var(--honey); }
.app-top .in { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.app-top img { width: 32px; height: 32px; border-radius: 8px; }
.app-top strong { font: 800 1.15rem var(--font-display); flex: 1; }
.app-top small { opacity: .85; }
.app-main { max-width: 640px; margin: 0 auto; padding: 16px 16px 24px; }
.view[hidden] { display: none !important; }
.app-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(6, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.app-tabs button { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 9px 4px 8px; min-height: 56px; font-size: .78rem; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.app-tabs button[aria-selected="true"] { color: var(--navy); box-shadow: inset 0 3px 0 var(--honey); }
.app-tabs button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.app-tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-main h2 { font-size: 1.35rem; margin: 6px 0 10px; }
.app-main .card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.card .when { font: 700 .8rem var(--font-body); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.card .deskname { font: 800 1.5rem/1.15 var(--font-display); margin: 2px 0; }
.card .meta { color: var(--muted); }
.chip { display: inline-block; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--mist); color: var(--ink); margin-top: 8px; }
.chip.ok { background: color-mix(in srgb, var(--ok) 20%, var(--surface)); color: var(--ok); }
.chip.warn { background: color-mix(in srgb, var(--honey) 30%, var(--surface)); }
.chip.bad { background: color-mix(in srgb, #D64545 18%, var(--surface)); color: #B83232; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.app-main .btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; }
.scanbox { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 1; max-height: 70vh; margin: 0 auto 12px; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanbox .frame { position: absolute; inset: 18%; border: 4px solid var(--honey); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
.sheet { position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom)); z-index: 7; max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 16px; box-shadow: 0 -8px 30px rgba(0,0,0,.18); }
.sheet h3 { font-size: 1.3rem; }
.dayrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.dayrow strong { font: 800 1.1rem var(--font-display); text-align: center; flex: 1; }
.empty { text-align: center; color: var(--muted); padding: 22px 8px 18px; }
#v-desk > p { margin: 14px 0 22px; }
#a-signin { margin-top: 0; padding: 20px 18px; }
#a-signin .fine { margin: 0 0 14px; line-height: 1.5; }
#a-signin .btn { margin-top: 6px; }
#v-desk .card + p.fine, #v-desk > p.fine { margin-top: 18px; }
.offline { background: color-mix(in srgb, var(--honey) 28%, var(--surface)); border: 1px solid var(--honey); border-radius: 12px; padding: 10px 12px; font-weight: 600; margin-bottom: 12px; }
.app-main .field input { font-size: 16px; }

/* How to get in */
.getin { border-width: 2px; border-color: var(--honey, #E8A21A); }
.getin h3 { margin: 0 0 8px; font: 800 1.3rem var(--font-display); }
.getin h4 { margin: 18px 0 6px; font: 700 1rem var(--font-display); }
.getin ul { margin: 0; padding-left: 20px; }
.getin li { margin: 3px 0; }
.getin .bigcode { margin: 0 0 14px; padding: 16px 12px; text-align: center; background: #FFF4D6; border: 2px solid #E8A21A; border-radius: 14px; }
.getin .bigcode small { display: block; font: 700 .85rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: #5a4300; }
.getin .bigcode strong { display: block; font: 800 3.4rem/1.1 var(--font-display); letter-spacing: .18em; color: #1d2b52; margin-top: 4px; word-break: break-all; }
.getin .doorimg { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 6px; border-radius: 12px; }
#a-signin .field { margin: 10px 0; }
#a-signin label { display: block; font-weight: 600; margin-bottom: 4px; }
#a-signin input { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
#a-signin h3 { margin: 0 0 6px; font: 800 1.15rem var(--font-display); }

#a-install { margin-top: 18px; padding: 20px 18px; }
#a-install h3 { margin: 0 0 6px; font: 800 1.15rem var(--font-display); }
#a-install .fine { margin: 0 0 12px; line-height: 1.5; }
#a-install .steps { margin: 0 0 16px; padding-left: 1.3em; display: grid; gap: 8px; line-height: 1.45; }

/* Report an issue */
#a-report-form { margin-top: 12px; }
#a-report-form .field { margin: 10px 0; }
#a-report-form select, #a-report-form textarea, #a-report-form input { font-size: 16px; }
#a-report-form select { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
#a-report-form textarea { min-height: 110px; }
#a-report-form .btn { margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.wifipw { font-size: 1.15rem; letter-spacing: .03em; user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
#a-wifi .btn { margin-top: 4px; }

/* Offers */
.offer { display: grid; grid-template-columns: 64px 1fr; gap: 6px 14px; align-items: start; }
.offer .offer-logo { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.offer .offer-logo.none { display: grid; place-items: center; font: 800 1.6rem var(--font-display); color: var(--navy); background: #FFF4D6; }
.offer h3 { margin: 0; font: 800 1.1rem/1.25 var(--font-display); overflow-wrap: anywhere; }
.offer .offer-by { margin: 0 0 2px; font: 700 .8rem var(--font-body); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
.offer p { margin: 6px 0 0; overflow-wrap: anywhere; }
.offer .offer-body { min-width: 0; }
.offer .offer-claim { margin-top: 10px; padding: 12px; background: #FFF4D6; border: 2px solid #E8A21A; border-radius: 12px; font-weight: 700; }
.offer .offer-claim small { display: block; font: 700 .75rem var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: #5a4300; margin-bottom: 4px; }
.offer .offer-locked { margin-top: 10px; padding: 10px 12px; background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.offer .offer-visit { margin-top: 10px; display: inline-block; }
