:root {
  color-scheme: dark;
  --bg: #101713;
  --panel: #19231e;
  --panel-2: #202c26;
  --line: #33453b;
  --ink: #f4f7f4;
  --muted: #9eaea5;
  --green: #44d17c;
  --acid: #d8ff47;
  --amber: #ffbd17;
  --danger: #ff6b57;
  --radius: 24px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(circle at 85% -5%, #1c3c2c 0, transparent 28rem), var(--bg); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left)); border-bottom: 1px solid #ffffff0c; background: #101713e8; backdrop-filter: blur(18px); }
.brand { display: flex; gap: 11px; align-items: center; color: inherit; text-decoration: none; }
.brand img { border-radius: 13px; }
.brand span { display: grid; }
.brand small, .eyebrow { margin: 0; color: var(--green); font-size: 11px; font-weight: 850; letter-spacing: .14em; }
.brand strong { font-size: 18px; }
.web-badge { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
main { width: min(100%, 760px); margin: auto; padding: 28px 18px 116px; }
.view { display: none; }
.view.active { display: block; animation: rise .3s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.hero-copy, .tools-header { margin: 16px 4px 28px; }
h1 { margin: 7px 0 12px; font-size: clamp(40px, 10vw, 64px); line-height: .96; letter-spacing: -.055em; }
h1 em { color: var(--acid); font-style: normal; }
h2 { margin: 0; font-size: 22px; }
.hero-copy > p:last-child, .tools-header > p:last-child { max-width: 560px; color: var(--muted); line-height: 1.6; }
.camera-card, .source-panel, .reading-card, .install-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, #1d2822, #141d18); box-shadow: 0 18px 50px #0005; }
.camera-stage { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #09100c; }
#camera { width: 100%; height: 100%; object-fit: cover; opacity: .76; }
.camera-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 7px; color: var(--muted); background: radial-gradient(circle, #254335, #0a100d 65%); }
.camera-placeholder.hidden { display: none; }
.bulb-icon { display: grid; width: 66px; height: 66px; place-items: center; border: 1px solid #ffffff22; border-radius: 50%; color: var(--acid); font-size: 38px; box-shadow: 0 0 55px #d8ff4740; }
.target { position: absolute; inset: 50% auto auto 50%; width: 98px; height: 98px; translate: -50% -50%; border: 2px solid #d8ff47aa; border-radius: 50%; box-shadow: 0 0 0 999px #06130d20; pointer-events: none; }
.target::before, .target::after, .target span::before, .target span::after { position: absolute; width: 14px; height: 2px; background: var(--acid); content: ""; }
.target::before { left: -7px; top: 48px; }.target::after { right: -7px; top: 48px; }.target span::before { left: 41px; top: -2px; rotate: 90deg; }.target span::after { left: 41px; bottom: -2px; rotate: 90deg; }
.quality-pill { position: absolute; left: 14px; top: 14px; padding: 8px 11px; border-radius: 999px; background: #101713dc; color: var(--muted); font-size: 12px; font-weight: 800; }
.quality-pill.stable { color: #8bf0b3; }.quality-pill.warn { color: var(--amber); }.quality-pill.bad { color: #ff978a; }
.primary-button, .secondary-button { min-height: 50px; border: 0; border-radius: 14px; font-weight: 850; }
.primary-button { background: var(--acid); color: #102016; }
.secondary-button { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); }
.camera-card > .primary-button { width: calc(100% - 28px); margin: 14px 14px 5px; }
.privacy-note { margin: 8px 14px 14px; color: var(--muted); font-size: 11px; text-align: center; }
.source-panel { margin-top: 16px; padding: 18px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin-top: 4px; }.section-heading > span { color: var(--muted); font: 700 12px ui-monospace, monospace; }
.source-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 16px; }
.source { display: grid; min-width: 0; min-height: 67px; place-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 13px; background: #111a15; color: var(--muted); }
.source span { font-size: 12px; font-weight: 900; }.source small { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.source.active { border-color: var(--acid); background: #27351c; color: var(--acid); box-shadow: inset 0 0 0 1px var(--acid); }
.reading-card { display: grid; grid-template-columns: 1.3fr 1fr; margin-top: 16px; }
.reading-main { padding: 23px; background: linear-gradient(150deg, #075f3b, #063520); }
.reading-main p { margin: 0 0 9px; color: var(--acid); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.reading-main strong { font-size: clamp(58px, 15vw, 88px); line-height: .8; letter-spacing: -.06em; }.reading-main > span { margin-left: 6px; color: #cfe0d5; }
.reading-side { display: grid; border-left: 1px solid var(--line); }.reading-side div { display: grid; padding: 13px 16px; }.reading-side div + div { border-top: 1px solid var(--line); }
.reading-side small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; }.reading-side strong { font-size: 27px; }.reading-side span { color: var(--muted); font-size: 10px; }
.reading-quality { grid-column: 1/-1; display: flex; justify-content: space-between; gap: 12px; padding: 12px 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }.reading-quality strong { color: var(--green); }
.settings-strip { display: grid; gap: 10px; margin-top: 14px; }.settings-strip label { display: grid; grid-template-columns: 1fr auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 15px; color: var(--muted); background: var(--panel); font-size: 11px; }.settings-strip input { grid-column: 1; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 22px; font-weight: 800; }.settings-strip span { grid-column: 2; grid-row: 2; align-self: center; }
.accuracy-callout { margin-top: 14px; padding: 16px; border-left: 3px solid var(--amber); border-radius: 3px 15px 15px 3px; background: #2b2719; }.accuracy-callout strong { color: #ffd468; }.accuracy-callout p { color: #c9c0a6; font-size: 12px; line-height: 1.5; }.accuracy-callout button { border: 0; padding: 0; background: none; color: var(--acid); font-weight: 800; }
.live-chip { display: flex; align-items: center; gap: 9px; margin: 0 3px 18px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }.live-chip > span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }.live-chip small { margin-left: auto; color: var(--muted); }
.tool-list { display: grid; gap: 10px; }.tool-card { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 13px; width: 100%; min-height: 91px; padding: 13px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(135deg, #202b25, #18211c); color: var(--ink); text-align: left; }.tool-card:active { scale: .985; }.tool-card i { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: #2b3b32; color: var(--green); font-style: normal; font-weight: 900; }.tool-card span { display: grid; gap: 5px; }.tool-card strong { font-size: 17px; }.tool-card small { color: var(--muted); line-height: 1.3; }.tool-card b { color: var(--muted); font-size: 28px; }.tool-card.featured { border-color: #718d36; }.tool-card.featured i { background: #3a421d; color: var(--acid); }
.install-card { margin-top: 22px; padding: 21px; }.install-card h2 { margin-top: 7px; }.install-card p:last-child { color: var(--muted); line-height: 1.55; }
.bottom-nav { position: fixed; z-index: 30; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; width: min(calc(100% - 28px), 430px); padding: 6px; translate: -50%; border: 1px solid var(--line); border-radius: 20px; background: #18211cf2; box-shadow: 0 16px 50px #0009; backdrop-filter: blur(18px); }.bottom-nav button { display: flex; min-height: 52px; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 15px; background: transparent; color: var(--muted); font-weight: 800; }.bottom-nav button.active { background: var(--acid); color: #132016; }.bottom-nav span { font-size: 20px; }
dialog { width: min(calc(100% - 24px), 620px); max-height: calc(100dvh - 40px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 24px; background: #17201b; color: var(--ink); box-shadow: 0 30px 90px #000c; } dialog::backdrop { background: #020805d9; backdrop-filter: blur(4px); }.dialog-head { position: sticky; z-index: 2; top: 0; display: flex; align-items: start; justify-content: space-between; padding: 19px 20px 14px; border-bottom: 1px solid var(--line); background: #17201bf2; }.dialog-head h2 { margin-top: 4px; }.dialog-head button { border: 0; background: none; color: var(--muted); font-size: 31px; }.dialog-head + div { padding: 20px; }.dialog-head + div > p { margin-top: 0; color: var(--muted); line-height: 1.55; }
.tool-result { margin: 12px 0; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-2); line-height: 1.6; white-space: pre-line; }.form-field { display: grid; gap: 7px; margin: 13px 0; color: var(--muted); font-size: 12px; }.form-field input { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: #0f1713; color: var(--ink); font-size: 18px; }.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }.heat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }.heat-cell { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); color: var(--ink); font-weight: 850; white-space: pre-line; }.guide-list { display: grid; gap: 8px; }.guide-row { display: flex; justify-content: space-between; gap: 15px; padding: 12px; border-bottom: 1px solid var(--line); }.guide-row span { color: var(--muted); }
@media (max-width: 520px) { main { padding-inline: 12px; }.source-panel { padding: 14px 10px; }.source-grid { gap: 4px; }.source { padding-inline: 2px; }.reading-card { grid-template-columns: 1fr; }.reading-side { grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 0; }.reading-side div + div { border-top: 0; border-left: 1px solid var(--line); }.reading-quality { display: grid; }.settings-strip { grid-template-columns: 1fr; } }
@media (display-mode: standalone) { .topbar { padding-top: calc(18px + env(safe-area-inset-top)); } }

/* Match the visual language of the native Android app. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f5f8f6;
  --line: #aebfb5;
  --ink: #06130d;
  --muted: #384a40;
  --green: #075f3b;
  --acid: #d8ff47;
  --amber: #a95d00;
  --danger: #b42c20;
  --radius: 22px;
}

html, body { background: #fff; }
body { color: var(--ink); }
.topbar {
  position: static;
  max-width: 760px;
  margin: auto;
  padding: calc(18px + env(safe-area-inset-top)) 20px 8px;
  border: 0;
  background: #fff;
  backdrop-filter: none;
}
.brand { gap: 14px; }
.brand img { width: 72px; height: 72px; border-radius: 50%; }
.brand small, .eyebrow { color: var(--green); }
.brand strong { color: var(--ink); font-size: clamp(27px, 7vw, 38px); font-weight: 900; letter-spacing: -.04em; }
.web-badge {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 4px solid var(--acid);
  border-radius: 50%;
  background: #073d29;
  color: #fff;
}
main { padding-top: 10px; }
#meterView .hero-copy { display: none; }
.tools-header { margin-top: 8px; }
h1 { color: var(--ink); font-size: clamp(38px, 9vw, 58px); }
h1 em { color: var(--green); }
.hero-copy > p:last-child, .tools-header > p:last-child { color: var(--muted); }

.camera-card, .source-panel, .reading-card, .install-card {
  border-color: var(--line);
  background: #fff;
  box-shadow: none;
}
.camera-stage {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #17051f, #073d32);
}
#camera { opacity: .72; transition: transform .2s ease; }
#camera.mirrored { transform: scaleX(-1); }
.camera-placeholder { color: #dce9e1; background: radial-gradient(circle at 50% 42%, #443046 0, #17051f 45%, #073d32 100%); }
.camera-placeholder strong { color: #fff; }
.bulb-icon { border-color: #d8ff4766; color: var(--acid); box-shadow: 0 0 55px #d8ff4766; }
.target { border-color: var(--acid); box-shadow: 0 0 0 999px #06130d20; }
.quality-pill { background: #10221acc; color: #fff; }
.quality-pill.stable { color: #a9f5c6; }
.camera-actions { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 10px; padding: 14px 14px 5px; }
.camera-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: #edf3ef; }
.camera-option { min-width: 0; min-height: 42px; padding: 5px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.camera-option.active { background: #075f3b; color: #fff; box-shadow: 0 3px 9px #063d2950; }
.camera-actions .primary-button { min-height: 50px; }
.primary-button { background: #073d29; color: #fff; }
.primary-button:disabled { opacity: .55; }
.secondary-button { border-color: var(--line); background: #fff; color: var(--green); }
.privacy-note { color: var(--muted); }

.source-panel { padding: 16px; }
.section-heading > span { color: var(--muted); }
.source { border-color: #52655a; background: #10221a; color: #cde1d5; }
.source.active { border-color: var(--acid); background: #073d29; color: var(--acid); box-shadow: inset 0 0 0 2px var(--acid); }

.reading-card { overflow: visible; grid-template-columns: 1fr 1fr; border: 0; background: transparent; }
.reading-main, .reading-side { background: linear-gradient(135deg, #064a30, #075f3b); }
.reading-main { border-radius: 22px 0 0 22px; }
.reading-main p { color: var(--acid); }
.reading-main strong, .reading-side strong { color: #fff; }
.reading-main > span, .reading-side span { color: #cde1d5; }
.reading-side { border: 0; border-radius: 0 22px 22px 0; }
.reading-side div + div { border-color: #ffffff33; }
.reading-side small { color: var(--acid); }
.reading-quality {
  margin-top: 9px;
  padding: 14px 17px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background: #fff;
  color: var(--muted);
}
.reading-quality strong { color: var(--green); }
.settings-strip label { border: 3px solid var(--line); background: #fff; color: var(--muted); }
.settings-strip input { color: var(--ink); }
.accuracy-callout { border: 3px solid var(--line); border-left-width: 7px; border-radius: 18px; background: #fff; }
.accuracy-callout strong { color: var(--green); }
.accuracy-callout p { color: var(--muted); }
.accuracy-callout button { color: var(--green); }

.live-chip { border-color: var(--line); background: #eaf3ee; }
.tool-card { border: 2px solid #c1d0c7; background: #f8faf9; color: var(--ink); box-shadow: none; }
.tool-card i { background: #e2f1e9; color: var(--green); }
.tool-card small, .tool-card b { color: var(--muted); }
.tool-card.featured { border-color: var(--green); }
.tool-card.featured i { background: #dff0e7; color: var(--green); }
.install-card { background: #073d29; color: #fff; }
.install-card .eyebrow { color: var(--acid); }
.install-card p:last-child { color: #cde1d5; }
.profile-button { display: grid; min-height: 52px; margin-top: 16px; place-items: center; border-radius: 14px; background: var(--acid); color: var(--ink); font-weight: 900; text-decoration: none; }
.install-card .install-alternative { margin-bottom: 0; color: #cde1d5; font-size: 12px; }

.bottom-nav { border-color: #2f5b47; background: #073d29f2; }
.bottom-nav button { color: #cde1d5; }
.bottom-nav button.active { background: var(--acid); color: var(--ink); }
dialog { border-color: var(--line); background: #fff; color: var(--ink); }
dialog::backdrop { background: #06130daa; }
.dialog-head { border-color: var(--line); background: #fff; }
.dialog-head button { color: var(--muted); }
.dialog-head + div > p { color: var(--muted); }
.tool-result { border-color: var(--line); background: #f4f8f5; }
.form-field { color: var(--muted); }
.form-field input { border-color: var(--line); background: #fff; color: var(--ink); }
.heat-cell { border-color: var(--line); background: #edf3ef; color: var(--ink); }
.guide-row { border-color: var(--line); }
.guide-row span { color: var(--muted); }

@media (max-width: 520px) {
  .topbar { padding-inline: 14px; }
  .brand img { width: 64px; height: 64px; }
  .brand strong { font-size: 30px; }
  .camera-actions { grid-template-columns: 1fr; }
  .reading-card { grid-template-columns: 1fr 1fr; }
  .reading-side { grid-template-columns: 1fr; border-top: 0; }
  .reading-side div + div { border-top: 1px solid #ffffff33; border-left: 0; }
  .reading-quality { display: grid; }
}
