.appbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.appbar .lead {
  justify-self: start;
}
.appbar .trail {
  justify-self: end;
}
.appbar .title {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.iconbtn {
  border: 0;
  background: transparent;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  width: 34px;
  height: 34px;
  border-radius: 9px;
  line-height: 1;
}
.brand {
  height: 22px;
}
.brand-faint {
  height: 16px;
  opacity: 0.34;
}
.chip {
  font-size: 12px;
  font-weight: 700;
  background: color-mix(in srgb, var(--line) 60%, var(--card));
  border-radius: 999px;
  padding: 5px 9px;
}
.step {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink2);
  font-family: var(--font-disp);
}
.offline {
  background: #fff4da;
  border-bottom: 1px solid #f4e2ae;
  color: #8a5b00;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  padding: 5px;
}
.centerpane {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 0 26px;
}
.errcircle {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: #fdecec;
  color: var(--err);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
}
.bigt {
  font-size: 18px;
  font-weight: 800;
}
.smt {
  font-size: 13px;
  color: var(--ink2);
}
.btn {
  border: 0;
  border-radius: var(--r-ctl);
  padding: 13px 18px;
  font-weight: 800;
  font-size: 14px;
  background: var(--ink);
  color: #fff;
}
.btn.ghost {
  background: var(--card);
  border: 1.5px solid var(--line);
  color: var(--ink);
}
.btn.danger {
  background: var(--card);
  border: 1.5px solid #f3c9cb;
  color: var(--err);
}
/* dark theme flips --ink to near-white, so a plain .btn becomes a light
   surface — give it dark text so the label stays readable. ghost/danger
   keep their card background and are listed again so they aren't caught. */
:root[data-theme="dark"] .btn {
  color: #14171c;
}
:root[data-theme="dark"] .btn.ghost {
  color: var(--ink);
}
:root[data-theme="dark"] .btn.danger {
  color: var(--err);
}
.sitefoot {
  text-align: center;
  padding: 10px;
}

.loginbody {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.loginwrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 22px;
}
.loginlogo {
  width: 150px;
  margin: 78px 0 10px;
}
.logincap {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #aeb4bd;
  margin: 0 0 30px;
}
.loginform {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
}
.flabel {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink2);
  margin: 6px 0 5px 2px;
}
.finput {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.loginerr {
  color: var(--err);
  font-weight: 700;
  font-size: 13px;
}
.loginform .btn {
  margin-top: 8px;
  width: 100%;
}

#s-scan {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 58px);
}
.finder {
  flex: 1;
  position: relative;
  min-height: 46vh;
  background: radial-gradient(120% 90% at 50% 20%, #2b2d36, var(--cam));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#scan-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reticle {
  position: relative;
  width: 78%;
  max-width: 320px;
  height: 96px;
  border-radius: 13px;
  box-shadow: 0 0 0 9999px rgba(10, 11, 14, 0.42);
}
.reticle::before,
.reticle::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 3px solid var(--ok);
}
.reticle::before {
  left: -2px;
  top: -2px;
  border-right: 0;
  border-bottom: 0;
  border-radius: 6px 0 0 0;
}
.reticle::after {
  right: -2px;
  bottom: -2px;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 6px 0;
}
.torch {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 18px;
}
.torch.on {
  background: var(--ok);
}
.startcam {
  position: relative;
  z-index: 2;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  padding: 20px 30px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.startcam-ic {
  font-size: 30px;
}
.scandiag {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 74px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}
.scandiag.err {
  color: #ffd7d7;
}
.sheet {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  margin-top: -16px;
  padding: 14px 16px 18px;
  position: relative;
  z-index: 1;
}
.grab {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #d7dae1;
  margin: 0 auto 12px;
}
.sheet .finput {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}
.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}
.pchip {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: color-mix(in srgb, var(--line) 55%, var(--card));
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
}
.btn:disabled {
  opacity: 0.5;
}
.bcfile {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.sheetrow {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}
.linkbtn {
  border: 0;
  background: transparent;
  color: var(--ink2);
  font-weight: 700;
  font-size: 12px;
  padding: 4px;
}

#s-product,
#s-review {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 90px;
}
.steps {
  display: flex;
  gap: 6px;
}
.steps i {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--line) 70%, var(--ink2));
}
.steps i.on {
  background: var(--ok);
}
.hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px;
}
.pname {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.22;
}
.psub {
  font-size: 13px;
  color: var(--ink2);
  font-weight: 600;
  margin-top: 3px;
}
.spec {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 8px;
  column-gap: 12px;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.spec dt {
  font-size: 13px;
  color: var(--ink2);
}
.spec dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-disp);
}
.slabel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink2);
  font-family: var(--font-disp);
}
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tile {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1.5px dashed #c9cdd6;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  overflow: hidden;
  color: var(--ink2);
}
.tile.done {
  border: 1.5px solid var(--line);
  background: #0e0f12;
}
.tile .filled {
  position: absolute;
  inset: 0;
}
.tile .thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile .ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.tile .plus {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 55%, var(--card));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.tile .tc {
  font-size: 12px;
  font-weight: 700;
}
.tile .req {
  position: absolute;
  top: 11px;
  left: 14px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--err);
}
.badge {
  position: absolute;
  top: 7px;
  right: 7px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 7px;
  color: #fff;
}
.badge.ok {
  background: var(--ok);
}
.badge.up {
  background: #2b2d33;
}
.badge.er {
  background: var(--err);
}
.tile .rt {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.94);
  color: #111;
  border-radius: 8px;
  padding: 5px;
}
.cardc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px 6px 14px 14px;
}
.cardhead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-right: 8px;
}
.hint {
  font-size: 10.5px;
  color: #9aa0a8;
  font-weight: 700;
}
.cscroll {
  overflow-x: auto;
  overflow-y: visible;
  margin-top: 12px;
  padding: 8px 12px 10px 2px;
  -webkit-overflow-scrolling: touch;
}
.cgrid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  gap: 16px 18px;
  width: max-content;
}
.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 44px;
  border: 0;
  background: transparent;
  padding: 0;
}
.swatch .sw-c {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: outline-color 0.12s;
}
.swatch .sw-l {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink2);
  text-align: center;
  line-height: 1.15;
}
.swatch.sel .sw-c {
  outline-color: var(--ink);
}
.swatch.sel .sw-l {
  color: var(--ink);
  font-weight: 800;
}
.clearcolor {
  margin: 12px 8px 0 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--err);
  background: transparent;
  border: 0;
  padding: 0;
}
.note {
  width: calc(100% - 8px);
  box-sizing: border-box;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  font-size: 14px;
  resize: none;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--card);
}
.scanmsg-inline {
  color: var(--err);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px;
  background: var(--card);
  border-top: 1px solid var(--line);
}

#s-capture {
  min-height: calc(100vh - 58px);
  background: var(--cam);
  display: flex;
}
.camwrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.camtitle {
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  padding: 14px;
}
.campreview {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.campreview img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
}
.camfile {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.camctl {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 16px 16px 28px;
}
#s-capture .camctl .btn {
  min-width: 130px;
}

.lrow {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.lrow .lic {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--line) 55%, var(--card));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.lrow .lt {
  font-size: 13px;
  font-weight: 700;
}
.lrow .lv {
  font-size: 12.5px;
  color: var(--ink2);
  font-weight: 700;
  font-family: var(--font-disp);
}
.lbtn {
  border: 0;
  background: var(--err);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  border-radius: 8px;
  padding: 5px 8px;
}
.tickcircle {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--ok);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
}

.themebtn {
  display: block;
  margin: 12px auto 0;
  border: 0;
  background: transparent;
  color: var(--ink2);
  font-weight: 700;
  font-size: 12px;
}

