:root {
    color-scheme: light;
    font-family: system-ui, sans-serif;
    color: #152e26;
    background: #f3f6f4;
    font-size: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body { margin: 0; }
main {
    width: min(100%, 33rem);
    margin-inline: auto;
    padding: max(1.5rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
header { padding: .35rem .25rem; }
.header-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem; }
#install-help { margin-bottom: 0; }
.brand { margin: 0 0 .25rem; color: #346459; font-weight: 700; }
h1, h2 { margin: 0; line-height: 1.15; }
h1 { font-size: 2.15rem; letter-spacing: -.04em; }
h2 { font-size: 1.25rem; }
p { margin: .55rem 0 .9rem; line-height: 1.45; }
.panel {
    background: #fff;
    border: 1px solid #d9e5df;
    border-radius: 1rem;
    padding: 1rem;
}
.actions, .group { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }
.group { justify-content: space-between; }
.group span { font-family: ui-monospace, monospace; font-size: .85rem; }
form { display: grid; gap: .55rem; }
label { font-size: .9rem; font-weight: 650; }
input, button { min-height: 2.8rem; border-radius: .55rem; font: inherit; }
input { min-width: 0; padding: .6rem; color: inherit; border: 1px solid #8ea9a0; }
button {
    border: 1px solid #176251;
    background: #176251;
    color: #fff;
    font-weight: 650;
    padding: .45rem .8rem;
    cursor: pointer;
}
button.secondary { background: transparent; color: #176251; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #597adf; outline-offset: 2px; }
details { margin-top: .85rem; }
summary { color: #176251; font-weight: 650; cursor: pointer; }
details form { margin-top: .65rem; }
.counter { margin: .55rem 0 1.15rem; }
.counter strong { font-size: 1.35rem; }
.feedback p:empty { display: none; }
.feedback { padding-inline: .25rem; }
#status[data-kind="error"] { color: #a12d22; }
#status[data-kind="success"] { color: #176251; font-weight: 650; }
.preview { position: relative; overflow: hidden; border-radius: .75rem; background: #14201d; }
video { display: block; width: 100%; max-height: 46vh; object-fit: contain; }
.viewfinder {
    position: absolute;
    inset: 14% 22%;
    border: 2px solid #c9f6e5;
    border-radius: .7rem;
    pointer-events: none;
}
.camera button { margin-top: .65rem; }
