[hidden] {
  display: none !important;
}
h2 {
  font-size: 1.1rem;
  margin: 24px 0 8px;
}
.capture,
.save-bar,
.live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--green);
}
.primary {
  background: var(--green);
  color: #fff;
  flex: 1 1 100%;
  font-size: 1.1rem;
}
.secondary {
  background: var(--card);
  color: var(--green);
  flex: 1 1 40%;
}
.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
label.primary:focus-within,
label.secondary:focus-within {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}
.live video {
  width: 100%;
  border-radius: 12px;
  background: #000;
}
.photo-wrap {
  position: relative;
  margin: 16px 0 0;
}
.photo-wrap img {
  display: block;
  width: 100%;
  border-radius: 12px;
}
.boxes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.box {
  position: absolute;
  border: 2px solid var(--lime);
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.6);
}
.box span,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 13px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.box span {
  position: absolute;
  top: -13px;
  left: -2px;
  border: 2px solid var(--lime);
}
.box.done {
  border-color: #fff;
}
.box.flag {
  border-color: #ffb547;
}
.bottles {
  list-style: none;
  padding: 0;
  margin: 0;
}
.bottle {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 12px 0;
  padding: 12px 14px;
}
.bottle.left-out {
  opacity: 0.55;
}
.bottle-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.bottle-head img {
  width: 64px;
  height: 96px;
  object-fit: contain;
  background: #f7f7f2;
  border-radius: 8px;
  flex: none;
}
.bottle-title {
  margin: 2px 0 0;
  font-size: 1.05rem;
}
.facts {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.fill {
  margin: 12px 0 0;
}
.meter {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: #e6ebe2;
  overflow: hidden;
}
.meter i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--green);
}
.fill-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 0;
  font-weight: 600;
}
.fill input[type="range"] {
  width: 100%;
  margin: 8px 0 0;
  min-height: 32px;
}
.pick select {
  width: 100%;
  min-height: 44px;
  margin: 10px 0 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}
.checks {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid var(--amber);
  background: #fff6e5;
  list-style: none;
  font-size: 0.92rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 2px 10px;
  border-radius: 12px;
  background: #eef2ea;
  font-size: 0.85rem;
}
details.read {
  margin: 10px 0 0;
}
details.read summary {
  cursor: pointer;
  min-height: 32px;
  color: var(--green);
  font-weight: 600;
}
details.read dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin: 8px 0 0;
  font-size: 0.9rem;
}
details.read dt {
  color: var(--muted);
}
details.read dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.leave {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  min-height: 32px;
}
.error {
  color: #8a1c1c;
  font-weight: 600;
}
.recent ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.recent li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.recent button {
  background: none;
  border: none;
  padding: 0;
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  min-height: 32px;
}
.quick-fill {
  display: flex;
  gap: 6px;
  margin: 10px 0 0;
}
.quick-fill .secondary {
  flex: 1 1 0;
  min-height: 44px;
  padding: 6px 4px;
  font-size: 1rem;
}
.fill.unknown .quick-fill .secondary {
  border-color: var(--amber);
  background: #fff6e5;
}
.plan {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: #eef2ea;
}
.plan-title {
  margin: 0 0 4px;
  font-weight: 600;
  font-size: 0.92rem;
}
.plan dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 12px;
  margin: 0;
  font-size: 0.9rem;
}
.plan dt {
  color: var(--muted);
}
.plan dd {
  margin: 0;
}
.quick-fill .secondary[aria-pressed="true"] {
  background: var(--green);
  color: #fff;
}
.modes {
  display: flex;
  gap: 0;
  margin: 12px 0 4px;
  border: 2px solid var(--green);
  border-radius: 10px;
  overflow: hidden;
}
.modes button {
  flex: 1 1 0;
  min-height: 44px;
  border: none;
  background: var(--card);
  color: var(--green);
  font-weight: 600;
  cursor: pointer;
}
.modes button[aria-selected="true"] {
  background: var(--green);
  color: #fff;
}
.steps {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  counter-reset: step;
}
.steps li {
  flex: 1 1 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #e6ebe2;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  counter-increment: step;
}
.steps li::before {
  content: counter(step) ". ";
}
.steps li[aria-current="step"] {
  background: var(--lime);
  color: var(--ink);
}
.viewfinder {
  position: relative;
  margin: 12px 0 0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.viewfinder video {
  display: block;
  width: 100%;
  max-height: 55vh;
  object-fit: cover;
}
.viewfinder .aim {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 35%;
  bottom: 35%;
  border: 3px solid var(--lime);
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgb(0 0 0 / 0.35);
}
.code-form {
  margin: 12px 0 0;
}
.code-form label {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
}
.code-row {
  display: flex;
  gap: 8px;
  margin: 4px 0 0;
}
.code-row input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}
.code-row .secondary {
  flex: 0 0 auto;
}
button.link {
  background: none;
  border: none;
  padding: 0;
  margin: 12px 0 0;
  min-height: 44px;
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.product-panel {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}
.product-panel h3 {
  margin: 0;
  font-size: 1.1rem;
}
.product-panel .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}
.tally ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tally li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
