:root {
  --bg: #14181b;
  --card: #1e252a;
  --card2: #272f35;
  --elev: #232b31;
  --line: #333c43;
  --txt: #e6ebee;
  --sub: #98a4ab;
  --faint: #6a757c;
  --rorbu: #e0603f;
  --rorbuD: #b8492e;
  --rorbuSoft: #2c201c;
  --teal: #58aabe;
  --tealSoft: #1c282d;
  --ok: #5cb07b;
  --okSoft: #1b2a21;
  --warn: #e0a24a;
  --warnSoft: #2c2416;
  --r: 8px;
  --r2: 6px;
  --r3: 4px;
  --font:
    "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", sans-serif;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 96px;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
.ic {
  display: inline-block;
  vertical-align: -0.16em;
  flex-shrink: 0;
}
.st-v,
.chip-v,
.slip-q,
.slip-total-v,
.reg-count,
.clean-count,
.phase-prog,
.ocr-prog {
  font-variant-numeric: tabular-nums;
}

/* header */
.hdr {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: calc(env(safe-area-inset-top) + 16px) 16px 15px;
  background: #182228;
  border-bottom: 1px solid var(--line);
}
.hdr-t {
  font-weight: 900;
  line-height: 1.15;
  font-size: 15.5px;
  letter-spacing: 0.01em;
}
.hdr-s {
  color: #8aa0a8;
  font-size: 12px;
  margin-top: 2px;
  font-weight: 400;
}

/* nav */
.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: #1a2126;
  border-top: 1px solid var(--line);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-b {
  flex: 1;
  padding: 9px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--faint);
}
.nav-b.active {
  color: var(--rorbu);
}
.nav-l {
  font-size: 11.5px;
  font-weight: 700;
}

.view {
  padding: 16px 16px 8px;
}

/* plan actions */
.plan-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.pa-btn {
  width: 100%;
  padding: 13px;
  border-radius: var(--r2);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pa-primary {
  background: var(--rorbu);
  color: #14181b;
}
.pa-primary:active {
  background: var(--rorbuD);
}
.pa-ghost {
  background: var(--card);
  color: var(--txt);
  border: 1px solid var(--line);
}
.pa-clear {
  align-self: center;
  margin-top: 2px;
  color: var(--sub);
  font-size: 13px;
  font-weight: 700;
  padding: 4px;
}

/* empty */
.empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--r);
  padding: 38px 22px;
  text-align: center;
  color: var(--sub);
}
.empty .ic {
  color: var(--faint);
  margin-bottom: 10px;
}
.empty-t {
  font-weight: 900;
  margin-bottom: 5px;
  color: var(--txt);
}
.empty-s {
  font-size: 14px;
  color: var(--sub);
  line-height: 1.45;
}

/* packing slip */
.slip {
  border-radius: var(--r);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
}
.slip-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--rorbu);
}
.slip-hd span {
  color: #14181b;
  font-weight: 900;
  letter-spacing: 0.1em;
  font-size: 12.5px;
}
.slip-copy {
  color: #14181b;
  font-size: 12.5px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.slip-body {
  padding: 12px 16px;
}
.slip-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.slip-total span:first-child {
  font-weight: 900;
  color: var(--rorbu);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.slip-total-v {
  font-size: 30px;
  font-weight: 900;
  color: var(--rorbu);
}
.slip-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 0;
}
.slip-row-indent {
  padding-left: 14px;
}
.slip-row > span:first-child {
  font-size: 14px;
  color: var(--txt);
}
.slip-dots {
  flex: 1;
  border-bottom: 1px dotted var(--line);
  transform: translateY(-3px);
}
.slip-q {
  font-size: 16px;
  font-weight: 900;
  color: var(--txt);
}
.slip-sub {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.slip-prem {
  font-size: 12.5px;
  margin-top: 8px;
  font-weight: 700;
  color: var(--warn);
  display: flex;
  align-items: center;
  gap: 5px;
}
.slip-note {
  font-size: 11.5px;
  margin-top: 8px;
  color: var(--faint);
  line-height: 1.4;
}

.section-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--sub);
  margin: 16px 0 8px;
}

/* card */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 15px;
  margin-bottom: 10px;
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.card-name {
  font-weight: 900;
  font-size: 15.5px;
  line-height: 1.25;
}
.card-name-wrap {
  min-width: 0;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.x {
  width: 32px;
  height: 32px;
  border-radius: var(--r2);
  flex-shrink: 0;
  background: var(--card2);
  color: var(--sub);
  display: flex;
  align-items: center;
  justify-content: center;
}
.x:active {
  background: var(--warnSoft);
  color: var(--warn);
}
.chips {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.chips-sm {
  margin-top: 10px;
}
.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--r2);
  border: 1px solid var(--line);
  background: var(--card2);
  flex: 1;
}
.chip-strong {
  border-color: var(--rorbu);
  background: var(--rorbuSoft);
}
.chip-v {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--txt);
}
.chip-strong .chip-v {
  color: var(--rorbu);
}
.chip-l {
  font-size: 11.5px;
  color: var(--sub);
  margin-top: 1px;
}
.onsite {
  font-size: 14px;
  margin-top: 12px;
  border-radius: var(--r2);
  padding: 10px 12px;
  background: var(--tealSoft);
  color: var(--txt);
  line-height: 1.4;
}
.onsite b {
  color: var(--teal);
}
.onsite-plain {
  background: transparent;
  padding: 10px 0 0;
}
.warn {
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--r2);
  padding: 8px 11px;
  margin-top: 8px;
  background: var(--warnSoft);
  color: var(--warn);
  line-height: 1.35;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.warn .ic {
  margin-top: 1px;
}

/* badges + tags */
.badge {
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: var(--r3);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.b-lrh {
  background: var(--tealSoft);
  color: var(--teal);
}
.b-plain {
  background: var(--rorbuSoft);
  color: var(--rorbu);
}
.b-prem {
  background: #2b2612;
  color: #e6be6a;
}
.tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r3);
  background: var(--card2);
  color: var(--sub);
}

/* procedure */
.proc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-top: 6px;
  overflow: hidden;
}
.proc > summary {
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
}
.proc > summary::-webkit-details-marker {
  display: none;
}
.proc > summary::after {
  content: "+";
  color: var(--sub);
  font-weight: 900;
}
.proc[open] > summary::after {
  content: "−";
}
.proc-body {
  padding: 0 16px 12px;
}
.proc-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
  font-size: 14px;
}
.proc-n {
  font-size: 12px;
  font-weight: 900;
  width: 16px;
  flex-shrink: 0;
  color: var(--rorbu);
}

/* registry */
.reg-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.reg-head h2 {
  font-size: 18px;
  font-weight: 900;
  margin: 0;
}
.reg-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
}
.inp {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: 11px 13px;
  font-size: 16px;
  background: var(--card2);
  color: var(--txt);
  outline: none;
  font-family: inherit;
}
.inp::placeholder {
  color: var(--faint);
}
.inp:focus {
  border-color: var(--teal);
}
.filters {
  display: flex;
  gap: 8px;
  margin: 10px 0 14px;
}
.filt {
  padding: 7px 13px;
  border-radius: var(--r2);
  font-size: 12.5px;
  font-weight: 700;
  background: var(--card);
  color: var(--sub);
  border: 1px solid var(--line);
}
.filt.on {
  background: var(--txt);
  color: var(--bg);
  border-color: var(--txt);
}
.reg-list {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.reg-row {
  width: 100%;
  text-align: left;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.reg-row:last-child {
  border-bottom: none;
}
.reg-row:active {
  background: var(--elev);
}
.reg-name {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reg-name-wrap {
  min-width: 0;
}
.reg-note {
  font-size: 12px;
  color: var(--faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
}
.reg-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.reg-star {
  color: #e6be6a;
  display: inline-flex;
}
.reg-tag {
  font-size: 12px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: var(--r3);
}
.reg-tag.done {
  background: var(--okSoft);
  color: var(--ok);
}
.reg-tag.miss {
  background: var(--card2);
  color: var(--faint);
}
.reg-empty,
.reg-more {
  padding: 22px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}
.reg-more {
  padding: 12px;
}

/* clean tab */
.clean-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.clean-head h2 {
  font-size: 18px;
  font-weight: 900;
  margin: 0;
}
.clean-count {
  font-size: 13px;
  font-weight: 900;
  color: var(--rorbu);
}
.clean-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--card2);
  overflow: hidden;
  margin-bottom: 10px;
}
.clean-bar-fill {
  height: 100%;
  background: var(--rorbu);
  border-radius: 3px;
  transition: width 0.25s;
}
.clean-note {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.4;
  margin-bottom: 10px;
}
.reset-btn {
  width: 100%;
  padding: 11px;
  border-radius: var(--r2);
  font-size: 13.5px;
  font-weight: 700;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--sub);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 14px;
}
.reset-btn.arm {
  border-color: var(--warn);
  color: var(--warn);
  background: var(--warnSoft);
}
.phase {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 6px 14px 12px;
  margin-bottom: 12px;
}
.phase.done {
  border-color: #2c4033;
}
.phase-hd {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.phase-n {
  width: 26px;
  height: 26px;
  border-radius: var(--r2);
  flex-shrink: 0;
  background: var(--card2);
  color: var(--rorbu);
  font-weight: 900;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phase.done .phase-n {
  background: var(--ok);
  color: var(--bg);
}
.phase-tt {
  flex: 1;
  min-width: 0;
}
.phase-title {
  font-weight: 900;
  font-size: 14.5px;
  line-height: 1.2;
}
.phase-note {
  font-size: 12px;
  color: var(--faint);
  margin-top: 2px;
}
.phase-prog {
  font-size: 12.5px;
  font-weight: 900;
  color: var(--sub);
}
.grp {
  margin-top: 6px;
}
.grp-sub {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 8px 0 3px;
}
.chk-row {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 8px 0;
}
.chk-box {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: var(--r3);
  border: 1.5px solid var(--line);
  background: var(--card2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #14181b;
  margin-top: 1px;
}
.chk-row.on .chk-box {
  background: var(--rorbu);
  border-color: var(--rorbu);
}
.chk-txt {
  font-size: 14px;
  line-height: 1.35;
  color: var(--txt);
}
.chk-row.on .chk-txt {
  color: var(--faint);
  text-decoration: line-through;
}

/* restocking reference */
.restock {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: 2px;
}
.restock > summary {
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.restock > summary::-webkit-details-marker {
  display: none;
}
.rs-body {
  padding: 0 16px 12px;
}
.rs-row {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.rs-name {
  font-size: 13.5px;
  font-weight: 900;
}
.rs-rule {
  font-size: 12.5px;
  color: var(--sub);
  margin-top: 2px;
  line-height: 1.35;
}

/* overlay */
.ov {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ov-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 12px;
  background: #182228;
  border-bottom: 1px solid var(--line);
}
.ov-back {
  color: var(--txt);
  display: flex;
  align-items: center;
  width: 28px;
}
.ov-title {
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ov-body {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px 120px;
}
.ov-foot {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: linear-gradient(transparent, var(--bg) 40%);
  padding-bottom: env(safe-area-inset-bottom);
}
.ov-foot-in {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px 20px;
}
.cta {
  width: 100%;
  padding: 14px;
  border-radius: var(--r2);
  font-size: 16px;
  font-weight: 900;
  background: var(--rorbu);
  color: #14181b;
}
.cta:active {
  background: var(--rorbuD);
}
.cta-off {
  background: var(--card2);
  color: var(--faint);
}
.del {
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  border-radius: var(--r2);
  font-size: 13.5px;
  font-weight: 700;
  background: transparent;
  border: 1px solid var(--warn);
  color: var(--warn);
}
.lang-switch {
  display: flex;
  gap: 8px;
}
.lang-opt {
  flex: 1;
  padding: 10px;
  border-radius: var(--r2);
  font-size: 14px;
  font-weight: 800;
  background: var(--card2);
  border: 1.5px solid var(--line);
  color: var(--sub);
}
.lang-opt.on {
  border-color: var(--rorbu);
  background: var(--rorbuSoft);
  color: var(--rorbu);
}
.lang-opt:active {
  opacity: 0.8;
}
.sync-intro {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.45;
  margin-bottom: 4px;
}
.sync-msg {
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: var(--r2);
  background: var(--card2);
  color: var(--sub);
}
.sync-msg.good {
  background: var(--okSoft);
  color: var(--ok);
}
.sync-msg.bad {
  background: var(--warnSoft);
  color: var(--warn);
}
.sync-msg.busy {
  background: var(--tealSoft);
  color: var(--teal);
}
.dt-btn[disabled] {
  opacity: 0.45;
}
.del.arm {
  background: var(--warnSoft);
}
.del:active {
  background: var(--warnSoft);
}

.sect {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 15px;
  margin-bottom: 12px;
}
.sect-accent {
  background: var(--rorbuSoft);
  border-color: var(--rorbuD);
}
.sect-lbl {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--rorbu);
  margin-bottom: 10px;
}
.sect-lbl.accent {
  color: var(--rorbu);
}

.sel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sel-info {
  min-width: 0;
}
.sel-name {
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sel-sub {
  font-size: 12px;
  margin-top: 3px;
}
.good {
  color: var(--ok);
}
.bad {
  color: var(--warn);
}
.link {
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
  flex-shrink: 0;
}

.res-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
}
.res {
  width: 100%;
  text-align: left;
  padding: 11px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.res:active {
  opacity: 0.6;
}
.res > span:first-child {
  font-size: 14px;
  font-weight: 400;
}
.res-tag {
  font-size: 11.5px;
  font-weight: 900;
  flex-shrink: 0;
  color: var(--faint);
}
.res-tag.good {
  color: var(--ok);
}
.res-add {
  color: var(--rorbu);
  font-weight: 900;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  gap: 10px;
}
.st-l {
  font-size: 14px;
  font-weight: 700;
}
.st-h {
  font-size: 12px;
  color: var(--faint);
  margin-top: 1px;
  font-weight: 400;
}
.st-ctrl {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.st-b {
  width: 38px;
  height: 38px;
  border-radius: var(--r2);
  border: 1px solid var(--line);
  background: var(--card2);
  font-size: 22px;
  font-weight: 700;
  color: var(--txt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.st-b:active {
  background: var(--elev);
}
.st-v {
  width: 34px;
  text-align: center;
  font-size: 19px;
  font-weight: 900;
}

.tg {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  text-align: left;
  gap: 10px;
}
.tg-track {
  width: 46px;
  height: 27px;
  border-radius: 999px;
  padding: 3.5px;
  flex-shrink: 0;
  background: var(--card2);
  border: 1px solid var(--line);
  transition:
    background 0.18s,
    border-color 0.18s;
}
.tg-track.on {
  background: var(--rorbu);
  border-color: var(--rorbu);
}
.tg-knob {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #e6ebee;
  transition: transform 0.18s;
}
.tg-track.on .tg-knob {
  transform: translateX(19px);
  background: #14181b;
}

.cap {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 0;
  color: var(--faint);
}
.cap-on {
  color: var(--teal);
}
.divider-top {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
}

.paste-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.paste-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--sub);
  margin-bottom: 6px;
}
.paste-row {
  display: flex;
  gap: 8px;
}
.btn-dark {
  padding: 0 14px;
  border-radius: var(--r2);
  font-size: 14px;
  font-weight: 900;
  background: var(--txt);
  color: var(--bg);
  flex-shrink: 0;
}
.btn-dark:active {
  opacity: 0.85;
}
.paste-msg {
  font-size: 12px;
  margin-top: 6px;
  font-weight: 700;
}
.paste-msg.good {
  color: var(--ok);
}
.paste-msg.bad {
  color: var(--warn);
}
.glink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
}
.notes-wrap {
  margin-top: 12px;
}
textarea.inp {
  resize: vertical;
  line-height: 1.4;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task-opt {
  width: 100%;
  text-align: left;
  border-radius: var(--r2);
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  background: var(--card2);
}
.task-opt:active {
  opacity: 0.75;
}
.task-opt.on {
  border-color: var(--rorbu);
  background: var(--rorbuSoft);
}
.task-l {
  font-weight: 900;
  font-size: 14px;
}
.task-opt.on .task-l {
  color: var(--rorbu);
}
.task-d {
  font-size: 12.5px;
  color: var(--sub);
  margin-top: 2px;
  line-height: 1.35;
}
.prem-line {
  font-size: 12.5px;
  margin-top: 8px;
  font-weight: 900;
  color: var(--warn);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* OCR */
.ocr-busy {
  padding: 40px 22px;
  text-align: center;
}
.spin {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 4px solid var(--line);
  border-top-color: var(--rorbu);
  margin: 0 auto 16px;
  animation: sp 1s linear infinite;
}
@keyframes sp {
  to {
    transform: rotate(360deg);
  }
}
.ocr-prog {
  font-size: 26px;
  font-weight: 900;
  color: var(--rorbu);
}
.ocr-msg {
  font-size: 14px;
  color: var(--txt);
  margin-top: 6px;
  font-weight: 700;
}
.ocr-hint {
  font-size: 12.5px;
  color: var(--faint);
  margin-top: 14px;
  line-height: 1.45;
}
.ocr-hint2 {
  font-size: 12px;
  color: var(--warn);
  margin-top: 8px;
  line-height: 1.4;
  display: flex;
  gap: 7px;
  align-items: flex-start;
}
.ocr-intro {
  font-size: 13.5px;
  color: var(--sub);
  margin-bottom: 12px;
  line-height: 1.45;
}
.ocr-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 12px;
}
.ocr-card.off {
  opacity: 0.5;
}
.ocr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ocr-kind {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: var(--r3);
}
.ocr-kind.task {
  background: var(--rorbuSoft);
  color: var(--rorbu);
}
.ocr-kind.cfg {
  background: var(--tealSoft);
  color: var(--teal);
}
.ocr-tg {
  font-size: 13px;
  font-weight: 900;
  color: var(--teal);
}
.ocr-raw {
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 6px;
}
.ocr-match {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
}
.ocr-mini {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.ocr-mini .stepper {
  padding: 4px 0;
}
.ocr-mini .st-l {
  font-size: 13px;
}
.ocr-type-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.ocr-type {
  padding: 7px 10px;
  border-radius: var(--r2);
  font-size: 12px;
  font-weight: 900;
  background: var(--card2);
  border: 1.5px solid var(--line);
  color: var(--sub);
}
.ocr-type.on {
  border-color: var(--rorbu);
  background: var(--rorbuSoft);
  color: var(--rorbu);
}
.ocr-typedesc {
  font-size: 12.5px;
  color: var(--sub);
  margin-top: 6px;
}
.rawtext {
  margin-top: 10px;
}
.rawtext > summary {
  font-size: 13px;
  font-weight: 700;
  color: var(--sub);
  cursor: pointer;
}
.rawtext pre {
  font-size: 11px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: 10px;
  overflow-x: auto;
  white-space: pre-wrap;
  color: var(--sub);
  margin-top: 8px;
}

/* time */
.time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--sub);
}
.time-inp {
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  color: var(--txt);
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  padding: 7px 10px;
  outline: none;
  color-scheme: dark;
}
.time-inp:focus {
  border-color: var(--teal);
}
.time-inp.big {
  font-size: 17px;
  padding: 9px 12px;
}
.time-none {
  font-size: 12px;
  color: var(--faint);
}
.time-ok {
  font-size: 12px;
  color: var(--ok);
  font-weight: 700;
}
.ocr-time {
  margin-top: 10px;
}

/* header button */
.hdr-tt {
  flex: 1;
  min-width: 0;
}
.hdr-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r2);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--sub);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hdr-btn:active {
  background: var(--card2);
  color: var(--txt);
}

/* Data overlay */
.dt-ok,
.dt-bad {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  padding: 11px 13px;
  border-radius: var(--r2);
  margin-bottom: 12px;
}
.dt-ok {
  background: var(--okSoft);
  color: var(--ok);
}
.dt-bad {
  background: var(--warnSoft);
  color: var(--warn);
}
.dt-explain {
  font-size: 13.5px;
  color: var(--sub);
  line-height: 1.5;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px;
  margin-bottom: 12px;
}
.dt-explain b {
  color: var(--txt);
  font-weight: 900;
}
.dt-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.dt-stat {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px;
  text-align: center;
}
.dt-n {
  display: block;
  font-size: 24px;
  font-weight: 900;
  color: var(--rorbu);
  line-height: 1.1;
}
.dt-l {
  display: block;
  font-size: 11.5px;
  color: var(--sub);
  margin-top: 3px;
}
.dt-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--r2);
  font-size: 14.5px;
  font-weight: 700;
  background: var(--card2);
  border: 1px solid var(--line);
  color: var(--txt);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 8px;
}
.dt-btn:active {
  background: var(--elev);
}
.dt-btn.accent {
  background: var(--rorbu);
  color: #14181b;
  border-color: var(--rorbu);
  font-weight: 900;
}
.dt-btn.accent:active {
  background: var(--rorbuD);
}
.dt-hint {
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.45;
  margin-top: 4px;
}
.dt-hint b {
  color: var(--sub);
  font-weight: 900;
}

/* toast */
#toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(20px);
  background: var(--txt);
  color: var(--bg);
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 100;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Startup screen: missing database config / connecting / connection error */
.setup-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.setup-box {
  max-width: 420px;
  text-align: center;
}
.setup-box h1 {
  font-size: 18px;
  margin: 0 0 6px;
}
.setup-box h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--warn);
  margin: 0 0 14px;
}
.setup-body {
  color: var(--sub);
  font-size: 14px;
  line-height: 1.5;
}
.setup-body pre {
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: 10px 12px;
  color: var(--txt);
  font-size: 13px;
  overflow-x: auto;
  text-align: left;
  margin: 12px 0;
}
.setup-screen .spin {
  margin: 0 auto;
}
