:root {
  --ink-900:#0F1A2E;
  --ink-800:#1E3366;
  --ink-600:#2F6BA8;
  --ink-400:#615A50;
  --ink-300:#BFB9AB;
  --ink-350:#8A8377;
  --paper:#F6F4EE;
  --paper-2:#EDE9DE;
  --paper-3:#E3DDCC;
  --card:#FDFCF9;
  --gold:#B68A36;
  --gold-hover:#C9A04E;
  --gold-dark:#8B6A28;
  --gold-text:#7A5520;
  --gold-light:#F7EDD8;
  --ok:#2E6B4F;
  --ok-light:#E6F0EA;
  --warn:#A04A1F;
  --warn-light:#F7EADF;
  --err:#8C2F39;
  --err-light:#F5E4E6;
  --info:#2F6BA8;
  --info-light:#E6EEF5;
  --purple:#6B5E8C;
  --purple-light:#ECE8F3;
  --seal:#B8382A;
  --seal-deep:#93281C;
  --seal-paper:#FFFBF2;
  --line:rgba(15,26,46,.12);
  --line-soft:rgba(15,26,46,.06);
  --radius:22px;
  --radius-s:12px;
  --sans:"Noto Sans TC","Microsoft JhengHei","PingFang TC",sans-serif;
  --serif:"Noto Serif TC","PMingLiU",serif;
  --kai:"DFKai-SB","BiauKai","Kaiti TC","標楷體",var(--serif);
  --mono:ui-monospace,"JetBrains Mono","Consolas","Courier New",monospace;
  --shadow:0 22px 66px rgba(15,23,42,.08);
  --shadow-lift:0 4px 14px rgba(15,26,46,.10),0 26px 70px rgba(15,23,42,.10);
}
* {
  box-sizing: border-box;
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
figure {
  margin: 0;
}
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
button {
  font-family: var(--sans);
  cursor: pointer;
}
a {
  color: var(--ink-600);
}
input,
select,
textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink-900);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: .55rem .8rem;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input.mono,
textarea.mono,
select.mono {
  font-family: var(--mono);
}
input:hover,
select:hover,
textarea:hover {
  border-color: rgba(15, 26, 46, .24);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--ink-600);
  box-shadow: 0 0 0 3px rgba(47, 107, 168, .18);
}
input[type=checkbox],
input[type=radio] {
  width: auto;
  accent-color: var(--ink-800);
}
label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink-800);
  display: block;
  margin-bottom: .25rem;
}
.hint {
  font-size: .8rem;
  color: var(--ink-400);
  margin-top: .2rem;
}
.field {
  margin-bottom: 1rem;
}
.field .ferr {
  display: none;
  font-size: .8rem;
  color: var(--err);
  margin-top: .2rem;
}
.field.invalid input,
.field.invalid select {
  border-color: var(--err);
  box-shadow: 0 0 0 3px rgba(140, 47, 57, .12);
}
.field.invalid .ferr {
  display: block;
}
.row-flex {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.skiplink {
  position: absolute;
  left: .5rem;
  top: -3rem;
  z-index: 100;
  background: var(--gold);
  color: var(--ink-900);
  font-weight: 600;
  padding: .6rem 1rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: top .12s ease;
}
.skiplink:focus {
  top: 0;
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes slide-in {
  from {
    transform: translateY(10px);
  }
  to {
    transform: none;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: .5;
  }
}
@keyframes sp {
  to {
    transform: rotate(360deg);
  }
}
@keyframes sheet-set {
  from {
    transform: rotateX(6deg) translateY(14px);
  }
  to {
    transform: rotateX(1.4deg);
  }
}
@keyframes stamp-press {
  0% {
    transform: rotate(var(--rot,-1deg)) scale(1.18);
  }
  60% {
    transform: rotate(var(--rot,-1deg)) scale(.97);
  }
  100% {
    transform: rotate(var(--rot,-1deg)) scale(1);
  }
}
.app-head {
  background:
    radial-gradient(
      720px 220px at 88% -60%,
      rgba(182, 138, 54, .22),
      transparent 65%),
    linear-gradient(
      135deg,
      var(--ink-800),
      #162B58);
  color: var(--paper);
  padding: .7rem 1.2rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(182, 138, 54, .35);
}
.app-head .brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.app-head .brand b {
  color: var(--gold-hover);
}
.brand-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  background:
    linear-gradient(
      155deg,
      #C64431,
      #9E2D20);
  color: #FFF3E2;
  font-family: var(--kai);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 5px;
  transform: rotate(-6deg);
  box-shadow: inset 0 0 0 1px rgba(255, 246, 232, .35), 0 2px 5px rgba(0, 0, 0, .35);
}
.deadline {
  margin-left: auto;
  background: rgba(246, 244, 238, .08);
  border: 1px solid rgba(246, 244, 238, .25);
  border-radius: 999px;
  padding: .2rem .9rem;
  font-size: .82rem;
  display: flex;
  gap: .5rem;
  align-items: center;
}
.deadline .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7FC79B;
  flex: 0 0 auto;
}
.deadline.soon .dot {
  background: var(--gold-hover);
  animation: pulse-dot 2.6s ease-in-out infinite;
}
.deadline.over .dot {
  background: var(--ink-300);
  animation: none;
}
.deadline b {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--gold-hover);
}
.whoami {
  font-size: .82rem;
  color: rgba(246, 244, 238, .85);
  display: flex;
  gap: .5rem;
  align-items: center;
}
.whoami button {
  background: transparent;
  border: 1px solid rgba(246, 244, 238, .35);
  color: var(--paper);
  border-radius: 999px;
  padding: .15rem .7rem;
  font-size: .78rem;
  transition: background .15s ease;
  min-height: 44px;
  min-width: 44px;
}
.whoami button:hover {
  background: rgba(246, 244, 238, .14);
}
.mainnav {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  padding: .5rem 1.2rem;
  display: flex;
  gap: .45rem;
  align-items: center;
  flex-wrap: wrap;
}
.mainnav a {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem .95rem;
  font-size: .87rem;
  color: var(--ink-800);
  text-decoration: none;
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}
.mainnav a:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15, 26, 46, .10);
}
.mainnav a.on {
  background: var(--ink-800);
  color: var(--paper);
  border-color: var(--ink-800);
  box-shadow: inset 0 -2px 0 var(--gold);
}
.mainnav a.cta {
  background:
    linear-gradient(
      180deg,
      var(--gold-hover),
      var(--gold));
  color: var(--ink-900);
  border-color: var(--gold-dark);
  font-weight: 600;
  box-shadow: 0 2px 0 var(--gold-dark);
}
.mainnav a.cta:hover {
  background:
    linear-gradient(
      180deg,
      #D3AC5E,
      #C09340);
}
.mainnav.wizard-mode a:not(.leave) {
  display: none;
}
main {
  max-width: 74rem;
  margin: 0 auto;
  padding: 1.4rem 1.2rem 6rem;
}
h1.pg {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin: .2rem 0 1rem;
  position: relative;
  padding-left: .9rem;
}
h1.pg::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42rem;
  width: 4px;
  height: 1.25em;
  border-radius: 2px;
  background:
    linear-gradient(
      180deg,
      var(--gold),
      var(--ink-800));
}
h1.pg .sub {
  display: block;
  font-family: var(--sans);
  font-size: .85rem;
  color: var(--ink-400);
  font-weight: 400;
  margin-top: .2rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem 1.5rem;
}
.card + .card {
  margin-top: 1.2rem;
}
.card h3 {
  font-family: var(--serif);
  font-size: 1rem;
  margin: 0 0 .6rem;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.card h3::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border: 2px solid var(--gold);
  border-radius: 2px;
  transform: rotate(45deg);
}
.btn {
  border: none;
  border-radius: 999px;
  padding: .6rem 1.5rem;
  font-size: .95rem;
  font-weight: 600;
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}
.btn:not(:disabled):hover {
  transform: translateY(-1px);
}
.btn:not(:disabled):active {
  transform: translateY(0) scale(.98);
}
.btn-primary {
  background: var(--ink-800);
  color: var(--paper);
  box-shadow: 0 2px 8px rgba(30, 51, 102, .28);
}
.btn-primary:not(:disabled):hover {
  box-shadow: 0 5px 16px rgba(30, 51, 102, .32);
}
.btn-primary:disabled {
  background: var(--ink-300);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-gold {
  background:
    linear-gradient(
      180deg,
      var(--gold-hover),
      var(--gold));
  color: var(--ink-900);
  box-shadow: 0 2px 0 var(--gold-dark), 0 4px 12px rgba(139, 106, 40, .30);
}
.btn-gold:not(:disabled):hover {
  background:
    linear-gradient(
      180deg,
      #D3AC5E,
      #C09340);
}
.btn-gold:disabled {
  background: var(--ink-300);
  box-shadow: none;
  cursor: not-allowed;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-800);
}
.btn-ghost:not(:disabled):hover {
  background: var(--paper-2);
}
.btn-danger {
  background: transparent;
  border: 1px solid var(--err);
  color: var(--err);
}
.btn-danger:not(:disabled):hover {
  background: var(--err-light);
}
.drift-flag {
  color: var(--err);
  margin-left: .25rem;
  cursor: help;
  font-weight: 700;
}
.reprint-banner.bad {
  background: var(--err-light);
  border-color: var(--err);
  color: var(--err);
}
.btn-sm {
  padding: .3rem .9rem;
  font-size: .85rem;
}
.muted {
  color: var(--ink-400);
}
.empty {
  text-align: center;
  color: var(--ink-400);
  padding: 2.4rem 1rem;
}
.loading-note {
  color: var(--ink-400);
  font-size: .9rem;
  padding: 1.4rem 0;
}
.errbar {
  background: var(--err-light);
  border: 1px solid rgba(140, 47, 57, .35);
  color: var(--err);
  border-radius: var(--radius-s);
  padding: .65rem 1rem;
  font-size: .9rem;
  margin-bottom: 1rem;
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  animation: rise .3s ease both;
}
.errbar b {
  flex: 0 0 auto;
}
.errbar .x {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--err);
  font-size: 1rem;
  line-height: 1;
}
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(
      900px 480px at 82% -12%,
      rgba(182, 138, 54, .16),
      transparent 62%),
    radial-gradient(
      700px 420px at -8% 108%,
      rgba(47, 107, 168, .18),
      transparent 60%),
    linear-gradient(
      140deg,
      var(--ink-900) 0%,
      var(--ink-800) 55%,
      #162B58 100%);
}
.login-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 26px 70px rgba(15, 23, 42, .4), 0 4px 16px rgba(15, 23, 42, .28);
  padding: 2.2rem 2rem;
  width: 100%;
  max-width: 26rem;
  border-top: 3px solid var(--gold);
  animation: pop .4s ease both;
}
.lhead {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.lstamp {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(
      155deg,
      #C64431,
      #9E2D20);
  color: #FFF6E8;
  border-radius: 9px;
  transform: rotate(-4deg);
  box-shadow:
    inset 0 0 0 2px rgba(255, 246, 232, .4),
    inset 0 0 10px rgba(60, 8, 4, .35),
    0 4px 10px rgba(15, 26, 46, .30);
}
.lstamp span {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--kai);
  font-weight: 700;
  font-size: 1.28rem;
  line-height: 1;
  letter-spacing: .14em;
}
.lstamp::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      7px 5px at 20% 24%,
      rgba(255, 251, 242, .42),
      transparent 70%),
    radial-gradient(
      6px 7px at 76% 66%,
      rgba(255, 251, 242, .36),
      transparent 70%),
    radial-gradient(
      5px 4px at 46% 88%,
      rgba(255, 251, 242, .30),
      transparent 70%);
}
.login-card .lbrand {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink-800);
  font-weight: 700;
}
.login-card .lsub {
  font-size: .85rem;
  color: var(--ink-400);
  margin: .15rem 0 0;
}
.login-card .btn {
  width: 100%;
  margin-top: .4rem;
}
.login-foot {
  font-size: .78rem;
  color: var(--ink-350);
  text-align: center;
  margin-top: 1.2rem;
  line-height: 1.5;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: rise .3s ease both;
}
.stat::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  right: 55%;
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background:
    linear-gradient(
      90deg,
      var(--gold),
      transparent);
}
.stat:nth-child(2) {
  animation-delay: .04s;
}
.stat:nth-child(3) {
  animation-delay: .08s;
}
.stat:nth-child(4) {
  animation-delay: .12s;
}
.stat:nth-child(5) {
  animation-delay: .16s;
}
.stat .k {
  font-size: .8rem;
  color: var(--ink-400);
}
.stat .v {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--ink-800);
  line-height: 1.25;
}
.stat .v.gold {
  color: var(--gold-text);
}
.stat .d {
  font-size: .78rem;
  color: var(--ink-400);
}
.stat.alert {
  border-color: rgba(160, 74, 31, .35);
  background: var(--warn-light);
}
.stat.alert::before {
  background:
    linear-gradient(
      90deg,
      var(--warn),
      transparent);
}
.stat.alert .v {
  color: var(--warn);
}
.quick {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}
body[data-route=wizard] main {
  max-width: 84rem;
}
body[data-route=orders] main,
body[data-route=dashboard] main {
  max-width: 88rem;
}
.wgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.6rem;
  align-items: start;
}
.wgrid > * {
  min-width: 0;
}
.wgrid--full {
  grid-template-columns: minmax(0, 1fr);
}
.wgrid--full .aside {
  display: none;
}
.stepper {
  display: flex;
  align-items: center;
  margin-bottom: 1.3rem;
  flex-wrap: wrap;
  row-gap: .45rem;
  max-width: 100%;
}
.stp {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .8rem .3rem .4rem;
  border-radius: 999px;
  font-size: .85rem;
  color: var(--ink-350);
  border: none;
  background: transparent;
  position: relative;
  transition: color .2s ease, background .2s ease;
}
.stp + .stp {
  margin-left: 26px;
}
.stp + .stp::after {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: var(--line);
}
.stp.done + .stp::after,
.stp.done + .stp.active::after {
  background: var(--ok);
}
.stp .n {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--paper-3);
  color: var(--ink-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: .8rem;
  flex: 0 0 auto;
  transition: background .2s ease, box-shadow .2s ease;
}
.stp.active {
  background: var(--ink-800);
  color: var(--paper);
  box-shadow: 0 3px 10px rgba(30, 51, 102, .30);
}
.stp.active .n {
  background: var(--gold);
  color: var(--ink-900);
  box-shadow: 0 0 0 3px rgba(182, 138, 54, .25);
}
.stp.done {
  color: var(--ink-800);
  cursor: pointer;
}
.stp.done .n {
  background: var(--ok);
  color: #fff;
}
.stp.done:hover {
  background: var(--ok-light);
}
.wstep {
  animation: slide-in .28s ease both;
}
.wstep h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin: 0 0 .3rem;
}
.wstep .sub {
  color: var(--ink-400);
  font-size: .92rem;
  margin-bottom: 1.3rem;
}
.wstep .field {
  margin-bottom: 1.25rem;
  max-width: 44rem;
}
.wstep .field > input,
.wstep .field > textarea,
.wstep .field > select {
  font-size: 1.08rem;
  padding: .7rem .9rem;
}
.wstep .field > label {
  font-size: .95rem;
  margin-bottom: .35rem;
}
.wstep .field .hint {
  font-size: .86rem;
}
.wstep--wide .field {
  max-width: none;
}
.wnav {
  display: flex;
  gap: .7rem;
  align-items: center;
  margin-top: 1.4rem;
  flex-wrap: wrap;
}
.wnav .spacer {
  flex: 1;
}
.why {
  background: var(--warn-light);
  border: 1px solid rgba(160, 74, 31, .3);
  border-left: 4px solid var(--warn);
  border-radius: var(--radius-s);
  padding: .6rem 1rem;
  font-size: .85rem;
  color: var(--warn);
  margin-top: .8rem;
  animation: rise .25s ease both;
}
.why ul {
  margin: .2rem 0 0 1.1rem;
  padding: 0;
}
.reprint-banner {
  background: var(--purple-light);
  border: 1px solid var(--purple);
  border-left: 4px solid var(--purple);
  color: var(--purple);
  border-radius: var(--radius-s);
  padding: .6rem 1rem;
  font-size: .88rem;
  margin-bottom: 1rem;
  animation: rise .3s ease both;
}
.scen {
  display: grid;
  gap: .9rem;
}
.scen-card {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  background: var(--card);
  cursor: pointer;
  position: relative;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition:
    border-color .15s ease,
    transform .15s ease,
    box-shadow .15s ease;
}
.scen-card:hover {
  border-color: var(--ink-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.scen-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-color: var(--ink-600);
}
.scen-card.sel {
  border-color: var(--gold);
  background: var(--gold-light);
  box-shadow: 0 4px 14px rgba(139, 106, 40, .16);
}
.scen-card.sel::after {
  content: "✓";
  position: absolute;
  top: -11px;
  right: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink-900);
  font-size: .85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(139, 106, 40, .4);
}
.scen-tx {
  flex: 1;
  min-width: 0;
}
.scen-card .t {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink-800);
}
.scen-card .d {
  font-size: .85rem;
  color: var(--ink-400);
}
.scen-card .stat-chip {
  display: inline-block;
  font-size: .75rem;
  background: var(--paper-2);
  border-radius: 999px;
  padding: .05rem .6rem;
  color: var(--ink-400);
  margin-top: .35rem;
  font-family: var(--mono);
}
.scen-card.sel .stat-chip {
  background: #fff;
}
.scen-ic {
  display: flex;
  gap: .35rem;
  align-items: flex-end;
  flex: 0 0 auto;
  padding-top: .15rem;
}
.mini-stamp {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--kai);
  font-weight: 700;
  line-height: 1;
  color: var(--seal);
  border: 2px solid currentColor;
  border-radius: 5px;
  background: var(--seal-paper);
  transform: rotate(-3deg);
}
.mini-stamp.ms-outline {
  width: 36px;
  height: 36px;
  font-size: 1rem;
}
.mini-stamp.ms-solid {
  width: 26px;
  height: 26px;
  font-size: .8rem;
  background:
    linear-gradient(
      155deg,
      #C64431,
      #9E2D20);
  color: #FFF6E8;
  border-color: #8E2517;
  transform: rotate(3deg);
}
.mini-stamp.ms-wide {
  width: 52px;
  height: 30px;
  font-size: .72rem;
  letter-spacing: .1em;
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px var(--seal-paper), inset 0 0 0 3px currentColor;
}
.mini-stamp.ms-dash {
  width: 36px;
  height: 36px;
  font-size: .72rem;
  border-style: dashed;
  color: var(--ink-400);
  background: var(--paper-2);
}
.subopts {
  display: none;
  margin-top: .7rem;
  gap: .4rem;
  flex-wrap: wrap;
}
.scen-card.sel .subopts {
  display: flex;
}
.subopt {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: .25rem .8rem;
  font-size: .85rem;
  color: var(--ink-800);
  transition: background .15s ease;
}
.subopt:hover {
  background: var(--paper-2);
}
.subopt.sel {
  background: var(--ink-800);
  color: var(--paper);
  border-color: var(--ink-800);
}
.gcis {
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--line);
  margin-bottom: 1rem;
  animation: slide-in .3s ease both;
  position: relative;
}
.gcis.loading {
  background: var(--info-light);
  border-color: rgba(47, 107, 168, .3);
}
.gcis.ok {
  background: var(--ok-light);
  border-color: rgba(46, 107, 79, .35);
}
.gcis.ok::before {
  content: "核對相符";
  position: absolute;
  top: .9rem;
  right: 1rem;
  z-index: 1;
  color: var(--seal);
  border: 2px solid currentColor;
  border-radius: 8px;
  padding: .3rem .45rem;
  font-family: var(--kai);
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .18em;
  line-height: 1;
  transform: rotate(-8deg);
  opacity: .85;
  background:
    radial-gradient(
      6px 4px at 24% 30%,
      var(--ok-light),
      transparent 70%),
    radial-gradient(
      5px 5px at 70% 72%,
      var(--ok-light),
      transparent 70%);
  animation: stamp-press .5s ease .2s both;
  --rot:-8deg;
}
.gcis.warn {
  background: var(--warn-light);
  border-color: rgba(160, 74, 31, .35);
}
.gcis.bad {
  background: var(--err-light);
  border-color: rgba(140, 47, 57, .35);
}
.gcis.skip {
  background: var(--paper-2);
}
.gcis .g-title {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.02rem;
}
.gcis.ok .g-title {
  color: var(--ok);
}
.gcis.warn .g-title {
  color: var(--warn);
}
.gcis.bad .g-title {
  color: var(--err);
}
.spin {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(47, 107, 168, .25);
  border-top-color: var(--info);
  border-radius: 50%;
  animation: sp 1s linear infinite;
  flex: 0 0 auto;
}
.gtbl {
  width: 100%;
  border-collapse: collapse;
  margin-top: .8rem;
  font-size: .88rem;
}
.gtbl th,
.gtbl td {
  text-align: left;
  padding: .4rem .5rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.gtbl th {
  font-size: .76rem;
  color: var(--ink-400);
  font-weight: 600;
}
.gtbl td.lv-match {
  color: var(--ok);
  font-weight: 600;
}
.gtbl td.lv-extended,
.gtbl td.lv-truncated {
  background: var(--warn-light);
  color: var(--warn);
  font-weight: 600;
}
.gtbl td.lv-mismatch {
  background: #F9D9DD;
  color: var(--err);
  font-weight: 700;
}
.gtbl td.lv-unknown {
  color: var(--ink-400);
}
.gtbl .lvmsg {
  display: block;
  font-size: .76rem;
  font-weight: 400;
  margin-top: .15rem;
}
.ackbox {
  margin-top: .9rem;
  background: #fff;
  border-radius: var(--radius-s);
  padding: .7rem .9rem;
  font-size: .9rem;
  box-shadow: 0 1px 4px rgba(15, 26, 46, .06);
}
.ackbox label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .55rem;
  align-items: start;
  font-weight: 400;
  font-size: .9rem;
  color: var(--ink-900);
  margin: 0;
  line-height: 1.65;
}
.ackbox label > span {
  min-width: 0;
}
.ackbox input[type=checkbox] {
  margin-top: .4rem;
  flex: 0 0 auto;
}
.ackbox--cta {
  background: var(--gold-light);
  border: 1px solid var(--gold);
  font-size: .95rem;
  padding: .9rem 1.1rem;
}
.ackbox--cta label {
  font-size: .95rem;
}
.qlbl {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink-800);
  margin-bottom: .25rem;
}
.unverifiable {
  background: var(--paper-2);
  border: 1px dashed var(--ink-400);
  border-left: 4px solid var(--warn);
  border-radius: var(--radius-s);
  padding: .8rem 1rem;
  font-size: .88rem;
  margin-top: .8rem;
}
.unverifiable b {
  color: var(--warn);
}
.item-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: .9rem;
  background: var(--card);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.item-card:hover {
  border-color: rgba(15, 26, 46, .22);
  box-shadow: 0 4px 14px rgba(15, 26, 46, .07);
}
.item-card .ih {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: .7rem;
  flex-wrap: wrap;
}
.item-card .ih .nm {
  font-weight: 700;
  color: var(--ink-800);
}
.item-card .ih .rm {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--ink-400);
  font-size: .85rem;
  text-decoration: underline;
}
.item-card .ih .rm:hover {
  color: var(--err);
}
.item-body {
  display: flex;
  gap: 1.6rem;
  align-items: flex-start;
}
.item-main {
  flex: 1;
  min-width: 0;
}
.item-stamp {
  flex: 0 0 auto;
  padding-top: .4rem;
  transform: scale(1.2);
  transform-origin: top center;
  margin: 0 .8rem;
}
.igrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .8rem;
}
.qty-field {
  grid-column: span 1;
}
.qty {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--gold-light);
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  padding: .25rem .5rem;
  width: fit-content;
}
.qty button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold-dark);
  background: var(--card);
  font-size: 1.35rem;
  line-height: 1;
  flex: 0 0 auto;
  color: var(--ink-900);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s ease, transform .12s ease;
}
.qty button:hover {
  background: #fff;
}
.qty button:active {
  transform: scale(.92);
}
.qty .qv {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  width: 2.6ch;
  min-width: 2.6ch;
  padding: 0;
  text-align: center;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--ink-900);
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  -moz-appearance: textfield;
}
.qty .qv:hover {
  border: none;
}
.qty .qv:focus {
  outline: 2px solid var(--gold-dark);
  outline-offset: 3px;
  box-shadow: none;
  border: none;
  background: #fff;
}
.qty .qunit {
  font-size: .9rem;
  color: var(--gold-text);
  font-weight: 600;
  padding-right: .35rem;
}
.qty-hint {
  font-size: .75rem;
}
.qty-warn {
  margin-top: .7rem;
  background: var(--warn-light);
  border: 1px solid rgba(160, 74, 31, .32);
  border-left: 4px solid var(--warn);
  border-radius: var(--radius-s);
  padding: .55rem .9rem;
  font-size: .86rem;
  color: var(--warn);
  line-height: 1.6;
}
.qtybar {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  flex-wrap: wrap;
  background: var(--ink-900);
  color: var(--paper);
  border: 1px solid rgba(182, 138, 54, .35);
  border-radius: var(--radius-s);
  padding: .7rem 1.1rem;
  margin-bottom: 1.1rem;
}
.qtybar .qb-l {
  font-size: .9rem;
  color: rgba(246, 244, 238, .8);
}
.qtybar .qb-n {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--gold-hover);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  display: inline-block;
  transform-origin: center;
}
.qtybar .qb-n.bump {
  animation: bump .45s ease;
}
.qtybar .qb-u {
  font-size: 1rem;
  color: var(--gold-hover);
  font-weight: 600;
  margin-right: .5rem;
}
.qtybar .qb-parts {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  flex-wrap: wrap;
  font-size: .9rem;
  color: rgba(246, 244, 238, .92);
}
.qtybar .qb-parts b {
  color: var(--gold-hover);
  font-size: 1.05rem;
}
.qtybar .qb-plus {
  color: rgba(246, 244, 238, .55);
}
.qtybar--lg {
  padding: .9rem 1.3rem;
}
.qtybar--lg .qb-n {
  font-size: 2rem;
}
.qtot {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .4rem;
}
.qtot .l {
  font-size: .9rem;
}
.qtot .v {
  margin-left: auto;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 2rem;
  color: var(--gold-hover);
  font-weight: 700;
  line-height: 1.1;
}
.qtot .v i {
  font-style: normal;
  font-size: .95rem;
  margin-left: .15rem;
}
.qtot-parts {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  font-size: .85rem;
  color: rgba(246, 244, 238, .9);
}
.qtot-parts b {
  color: var(--gold-hover);
  font-size: 1rem;
}
.chks {
  display: flex;
  gap: 1rem;
  margin-top: .6rem;
  font-size: .9rem;
  flex-wrap: wrap;
}
.chks label {
  display: flex;
  gap: .35rem;
  align-items: center;
  font-weight: 400;
  margin: 0;
}
.fontsame {
  background: var(--gold-light);
  border: 1px solid var(--gold);
  border-radius: var(--radius-s);
  padding: .55rem .9rem;
  font-size: .9rem;
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.addbar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.stamp-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  flex: 0 0 auto;
  position: relative;
}
.stamp-anchor {
  position: relative;
  display: flex;
  flex: 0 0 auto;
}
.stamp-anchor--badged {
  margin-top: 24px;
}
.st-qty {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 3px;
  z-index: 2;
  background:
    linear-gradient(
      180deg,
      var(--gold-hover),
      var(--gold));
  color: var(--ink-900);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: .82rem;
  line-height: 1;
  border-radius: 999px;
  padding: .22rem .5rem;
  box-shadow: 0 2px 6px rgba(139, 106, 40, .45), inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.stamp {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--seal);
  font-family: var(--kai);
  font-weight: 700;
  line-height: 1;
  background: var(--seal-paper);
  border: 3px solid currentColor;
  border-radius: 7px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 251, 242, .65),
    inset 0 0 9px rgba(147, 40, 28, .20),
    0 2px 7px rgba(15, 26, 46, .14);
  transform: rotate(var(--rot,-1deg));
}
.stamp.is-new {
  animation: stamp-press .35s ease both;
}
.stamp::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(
      7px 5px at 16% 22%,
      rgba(255, 251, 242, .5),
      transparent 70%),
    radial-gradient(
      5px 7px at 74% 62%,
      rgba(255, 251, 242, .42),
      transparent 70%),
    radial-gradient(
      8px 5px at 38% 88%,
      rgba(255, 251, 242, .38),
      transparent 70%),
    radial-gradient(
      4px 4px at 88% 16%,
      rgba(255, 251, 242, .45),
      transparent 70%);
}
.stamp .sg-grid {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  justify-content: center;
  gap: .08em;
  line-height: 1.1;
  letter-spacing: 0;
}
.stamp .sg-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
}
.stamp .sg-col span {
  display: block;
}
.nm-grid {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  justify-content: center;
  gap: .06em;
}
.nm-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  line-height: 1.02;
  flex: 0 0 auto;
}
.nm-col span {
  display: block;
}
.stamp-name {
  background:
    linear-gradient(
      160deg,
      #C64431,
      #A22C1D);
  color: #FFF6E8;
  border-color: #8E2517;
  box-shadow:
    inset 0 0 0 1px rgba(255, 246, 232, .35),
    inset 0 0 10px rgba(60, 8, 4, .30),
    0 2px 7px rgba(15, 26, 46, .16);
}
.stamp-name::after {
  background:
    radial-gradient(
      6px 4px at 20% 26%,
      rgba(255, 246, 232, .28),
      transparent 70%),
    radial-gradient(
      5px 6px at 72% 68%,
      rgba(255, 246, 232, .24),
      transparent 70%);
}
.stamp-round {
  border-radius: 50%;
}
.stamp-wide {
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
  max-width: 176px;
  padding: 8px 10px;
  border-width: 2px;
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 2px var(--seal-paper),
    inset 0 0 0 3px currentColor,
    0 2px 7px rgba(15, 26, 46, .14);
}
.stamp-wide .il {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .08em;
  text-align: center;
}
.stamp-bar {
  height: 30px;
  min-width: 110px;
  max-width: 190px;
  padding: 0 10px;
  border-width: 2px;
  border-radius: 5px;
  white-space: nowrap;
  letter-spacing: .12em;
}
.stamp-empty {
  width: 76px;
  height: 76px;
  color: var(--ink-300);
  border: 2px dashed var(--ink-300);
  background: var(--paper-2);
  font-family: var(--sans);
  font-weight: 400;
  font-size: .75rem;
  text-align: center;
  line-height: 1.4;
  box-shadow: none;
  animation: none;
}
.stamp-empty::after {
  content: none;
}
.stamp-cap {
  font-size: .74rem;
  color: var(--ink-350);
  text-align: center;
  line-height: 1.35;
  max-width: 130px;
  overflow-wrap: anywhere;
}
.stamp-strip {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: .7rem .2rem .4rem;
}
.stamp-strip--lg {
  gap: 1.8rem;
  padding: 1rem .2rem .5rem;
}
.stamp-strip--lg .stamp-box {
  transform: scale(1.35);
  transform-origin: bottom center;
  margin: 0 1.1rem .9rem;
}
.stamp-note {
  margin: .1rem 0 .9rem;
}
.aside {
  position: sticky;
  top: 1rem;
}
.psum {
  background:
    radial-gradient(
      420px 160px at 90% -20%,
      rgba(182, 138, 54, .20),
      transparent 65%),
    var(--ink-900);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(182, 138, 54, .28);
  box-shadow: 0 14px 40px rgba(15, 26, 46, .22);
}
.psum h3 {
  margin: 0 0 .8rem;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--gold-hover);
  letter-spacing: .08em;
}
.psum .stamp-strip {
  padding: .2rem 0 .4rem;
  gap: 1rem;
  justify-content: center;
}
.psum .stamp-cap {
  color: rgba(246, 244, 238, .72);
}
.pline {
  margin-bottom: .7rem;
  border-bottom: 1px solid rgba(246, 244, 238, .12);
  padding-bottom: .55rem;
}
.pline .pn {
  font-size: .87rem;
  overflow-wrap: anywhere;
}
.pline .pf {
  font-size: .75rem;
  color: var(--ink-350);
  font-family: var(--mono);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.pline .pv {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: .95rem;
}
.pline.pending .pv {
  color: var(--gold-hover);
  font-size: .82rem;
}
.ptot {
  display: flex;
  align-items: baseline;
  margin-top: .9rem;
  gap: .5rem;
}
.ptot .l {
  font-size: .9rem;
}
.ptot .v {
  margin-left: auto;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.45rem;
  color: var(--gold-hover);
  font-weight: 600;
  display: inline-block;
  transform-origin: right center;
}
.ptot .v.bump {
  animation: bump .45s ease;
}
.pnote {
  font-size: .78rem;
  color: rgba(246, 244, 238, .75);
  margin-top: .5rem;
  line-height: 1.55;
}
.asum {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-top: 1rem;
  font-size: .88rem;
  color: var(--ink-400);
  overflow-wrap: anywhere;
}
.asum b {
  color: var(--ink-800);
}
.sheet-wrap {
  overflow-x: auto;
  background:
    linear-gradient(
      165deg,
      var(--paper-2),
      var(--paper-3));
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem;
  perspective: 1100px;
}
.sheet {
  background-color: #FFFEF8;
  background-image:
    linear-gradient(
      0deg,
      rgba(46, 38, 18, .018) 1px,
      transparent 1px),
    radial-gradient(
      900px 380px at 18% -8%,
      rgba(182, 138, 54, .05),
      transparent 60%);
  background-size: 100% 3px, auto;
  color: #000;
  font-family: var(--serif);
  width: 100%;
  min-width: 520px;
  max-width: 760px;
  margin: 0 auto;
  padding: 2.2rem 2.4rem;
  box-shadow:
    0 1px 2px rgba(15, 26, 46, .14),
    0 10px 24px rgba(15, 26, 46, .16),
    0 30px 60px rgba(15, 26, 46, .13);
  transform: rotateX(1.4deg);
  transform-origin: top center;
  transition: transform .35s ease, box-shadow .35s ease;
  animation: sheet-set .5s ease backwards;
}
.sheet-wrap:hover .sheet {
  transform: rotateX(0);
  box-shadow:
    0 1px 2px rgba(15, 26, 46, .12),
    0 14px 30px rgba(15, 26, 46, .18),
    0 36px 72px rgba(15, 26, 46, .14);
}
.sheet-wrap--compact {
  padding: 1.1rem .85rem;
}
.sheet-wrap--compact .sheet {
  min-width: 0;
  max-width: 100%;
  padding: 1.15rem 1.05rem;
}
.sheet-wrap--compact .sheet-title {
  font-size: .98rem;
  letter-spacing: .18em;
  margin-bottom: .7rem;
}
.sheet-wrap--compact .stbl {
  font-size: .74rem;
}
.sheet-wrap--compact .stbl td {
  padding: .3rem .4rem;
}
.sheet-wrap--compact .s-free {
  font-size: .84rem;
}
.sheet-wrap--compact .s-free div {
  line-height: 1.6;
}
.sheet-wrap--compact .s-box {
  width: 1.9em;
  height: 1.25em;
}
.sheet-wrap--compact .s-vert {
  width: 1.6em;
}
.sheet-wrap--compact .s-foot {
  font-size: .7rem;
}
.sheet-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .32em;
  margin-bottom: 1.1rem;
}
.stbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.stbl td {
  border: 1.5px solid #000;
  padding: .55rem .75rem;
  vertical-align: top;
}
.s-line {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: .25rem 0;
}
.s-box {
  display: inline-flex;
  width: 2.2em;
  height: 1.4em;
  border: 1.5px solid #000;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--mono);
}
.s-free div {
  margin: .15rem 0;
  overflow-wrap: anywhere;
}
.s-qty {
  font-weight: 800;
  background: rgba(182, 138, 54, .22);
  border-radius: 3px;
  padding: 0 .18em;
  box-decoration-break: clone;
}
.s-vert {
  width: 2.2em;
  text-align: center;
  font-weight: 700;
}
.s-lab {
  width: 7.5em;
  font-weight: 600;
}
.s-val {
  font-family: var(--mono);
  font-size: .94rem;
}
.s-foot {
  display: flex;
  justify-content: space-between;
  font-size: .84rem;
  margin-top: .9rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.filters {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.filters .f {
  min-width: 128px;
  flex: 0 1 auto;
  margin: 0;
}
.filters .f input,
.filters .f select {
  padding: .4rem .7rem;
  font-size: .9rem;
}
.filters .f .hint {
  font-size: .72rem;
}
.filters .fw {
  flex: 1 1 180px;
}
.filters-toggle {
  display: none;
  margin-bottom: .8rem;
}
.rowlink {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--ink-300);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.rowlink:hover {
  color: var(--ink-600);
  border-bottom-color: var(--ink-600);
}
h1.pg .sub a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-right: .4rem;
}
.linkbtn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--ink-600);
  text-decoration: underline;
  font-family: var(--mono);
}
.tbl-scroll {
  overflow-x: auto;
}
.otbl {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.otbl td {
  overflow-wrap: anywhere;
}
.otbl[data-t=orders-table] {
  min-width: 1080px;
  table-layout: fixed;
}
.otbl:not([data-t=orders-table]) {
  min-width: 720px;
}
.otbl th {
  text-align: left;
  font-size: .76rem;
  color: var(--ink-400);
  font-weight: 600;
  letter-spacing: .03em;
  padding: .5rem .6rem;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.otbl td {
  padding: .6rem .6rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.otbl tr.row {
  cursor: pointer;
  transition: background .12s ease;
}
.otbl tr.row:hover {
  background: var(--gold-light);
  box-shadow: inset 3px 0 0 var(--gold);
}
.otbl .amt {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.otbl .idc {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.free-strike {
  text-decoration: line-through;
  color: var(--ink-350);
}
.free-tag {
  font-size: .7rem;
  color: var(--err);
  display: block;
}
.badge {
  display: inline-block;
  font-size: .74rem;
  border-radius: 999px;
  padding: .08rem .6rem;
  white-space: nowrap;
  font-weight: 600;
  border: none;
}
button.badge {
  font-family: var(--sans);
  line-height: inherit;
}
.b-draft,
.b-sent,
.b-delivered,
.b-reconciled,
.b-paid,
.b-void {
  padding-left: .5rem;
}
.b-draft::before,
.b-sent::before,
.b-delivered::before,
.b-reconciled::before,
.b-paid::before,
.b-void::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .75;
  margin-right: .32rem;
  vertical-align: .08em;
}
.b-draft {
  background: var(--paper-3);
  color: var(--ink-400);
}
.b-sent {
  background: var(--info-light);
  color: var(--info);
}
.b-delivered {
  background: var(--ok-light);
  color: var(--ok);
}
.b-reconciled {
  background: var(--gold-light);
  color: var(--gold-text);
  border: 1px solid var(--gold);
}
.b-paid {
  background: var(--ink-800);
  color: var(--paper);
}
.b-void {
  background: var(--err-light);
  color: var(--err);
  text-decoration: line-through;
}
.b-ours {
  background: var(--warn-light);
  color: var(--warn);
}
.b-vendor {
  background: var(--err-light);
  color: var(--err);
}
.b-unclear {
  background: var(--purple-light);
  color: var(--purple);
}
.b-relink {
  background: var(--paper-2);
  color: var(--ink-600);
  border: 1px dashed var(--ink-600);
  cursor: pointer;
}
.b-neutral {
  background: var(--paper-3);
  color: var(--ink-400);
}
.b-warnflag {
  background: var(--warn-light);
  color: var(--warn);
}
.pager {
  display: flex;
  gap: .6rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: .9rem;
  font-size: .85rem;
}
.pager .mono {
  color: var(--ink-350);
}
.dgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
}
.dgrid > * {
  min-width: 0;
}
.kv {
  display: grid;
  grid-template-columns: 7em minmax(0, 1fr);
  gap: .3rem .8rem;
  font-size: .92rem;
}
.kv .k {
  color: var(--ink-400);
  font-size: .83rem;
}
.kv .v {
  overflow-wrap: anywhere;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .86rem;
}
.timeline li {
  padding: .35rem 0 .35rem 1.4rem;
  position: relative;
  border-left: 2px solid var(--line);
  margin-left: .4rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: .75rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink-300);
  transition: box-shadow .2s ease;
}
.timeline li.now::before {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(182, 138, 54, .22);
}
.timeline .ts {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--ink-400);
  display: block;
}
.errbox {
  background: var(--err-light);
  border: 1px solid rgba(140, 47, 57, .3);
  border-left: 4px solid var(--err);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-top: 1rem;
}
.errbox div {
  overflow-wrap: anywhere;
}
.errbox h4 {
  margin: 0 0 .4rem;
  color: var(--err);
  font-size: .95rem;
}
.evi {
  display: flex;
  gap: .6rem;
  margin-top: .6rem;
  flex-wrap: wrap;
}
.evi a {
  width: 100px;
  min-height: 64px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: .62rem;
  color: var(--ink-400);
  text-align: center;
  padding: .3rem;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform .15s ease, box-shadow .15s ease;
}
.evi a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 26, 46, .12);
}
.actbar {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
}
.actbar--main {
  margin-top: 1.4rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--line-soft);
}
.actbar:not(.actbar--main) {
  margin-top: .8rem;
}
.actbar--exception {
  padding-top: .7rem;
  border-top: 1px dashed var(--line);
}
.actbar--exception::before {
  content: "例外處理";
  font-size: .76rem;
  color: var(--ink-350);
  margin-right: .2rem;
}
.filebtn {
  position: relative;
}
.filebtn:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.rrow {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem .4rem;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
  transition: background .15s ease;
}
.rrow .ri {
  flex: 1;
  min-width: 180px;
}
.rrow .ra {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rrow.excl {
  opacity: .7;
  background: var(--paper-2);
  border-radius: var(--radius-s);
}
.rrow.flagged {
  background: var(--warn-light);
  border-radius: var(--radius-s);
}
.rtog {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 auto;
}
.rtog button {
  border: none;
  background: var(--card);
  padding: .25rem .8rem;
  font-size: .8rem;
  color: var(--ink-800);
  transition: background .15s ease, color .15s ease;
}
.rtog button.on-ok {
  background: var(--ok);
  color: #fff;
}
.rtog button.on-q {
  background: var(--warn);
  color: #fff;
}
.rdetail {
  padding: .4rem 0 .8rem 1rem;
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.meter {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: .7rem 1rem;
  margin: .9rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  transition:
    background .3s ease,
    border-color .3s ease,
    box-shadow .3s ease;
}
.meter .mv {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.22rem;
  font-weight: 600;
}
.meter.zero {
  border-color: var(--ok);
  background: var(--ok-light);
  box-shadow: 0 0 0 3px rgba(46, 107, 79, .12);
}
.meter.zero .mv {
  color: var(--ok);
}
.meter.off .mv {
  color: var(--warn);
}
.bigin {
  font-size: 1.5rem;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  max-width: 280px;
}
.rsum {
  display: grid;
  grid-template-columns: auto auto;
  gap: .35rem 2rem;
  font-size: .95rem;
  justify-content: start;
}
.rsum .n {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.rsum .tt {
  font-weight: 700;
  border-top: 2px solid var(--ink-800);
  padding-top: .35rem;
}
.ptbl {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: .88rem;
}
.ptbl th {
  text-align: left;
  font-size: .76rem;
  color: var(--ink-400);
  padding: .45rem .6rem;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.ptbl td {
  padding: .4rem .6rem;
  border-bottom: 1px solid var(--line-soft);
}
.ptbl .amt {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.ptbl input {
  padding: .28rem .5rem;
  font-size: .85rem;
  max-width: 7rem;
  font-family: var(--mono);
  text-align: right;
}
.ptbl input.wide {
  max-width: 14rem;
  text-align: left;
  font-family: var(--sans);
}
.ptbl tr.dirty {
  background: var(--gold-light);
}
.src-firm {
  color: var(--gold-text);
  font-weight: 600;
}
.src-vendor {
  color: var(--ink-400);
}
.src-manual {
  color: var(--warn);
}
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 46, .55);
  z-index: 50;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  backdrop-filter: blur(2px);
}
.overlay.show {
  display: flex;
}
.modal {
  background: var(--card);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  padding: 1.5rem 1.6rem;
  box-shadow: 0 30px 80px rgba(15, 26, 46, .35);
  border-top: 3px solid var(--gold);
}
.overlay.show .modal {
  animation: pop .25s ease both;
}
.modal h3 {
  margin: 0 0 .2rem;
  font-family: var(--serif);
}
.who {
  display: grid;
  gap: .6rem;
  margin: .8rem 0;
}
.modal:focus {
  outline: none;
}
.who label {
  border: 2px solid var(--line);
  border-radius: var(--radius-s);
  padding: .7rem .9rem;
  display: flex;
  gap: .6rem;
  font-weight: 400;
  cursor: pointer;
  margin: 0;
  align-items: flex-start;
  transition: border-color .15s ease, background .15s ease;
}
.who label:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(182, 138, 54, .22);
}
.who label:hover {
  border-color: var(--ink-600);
}
.who label.sel {
  border-color: var(--gold);
  background: var(--gold-light);
}
.who input {
  margin-top: .25rem;
  flex: 0 0 auto;
}
.who .wt {
  font-weight: 700;
}
.who .wd {
  font-size: .82rem;
  color: var(--ink-400);
  display: block;
}
.upzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius-s);
  padding: 1rem;
  text-align: center;
  color: var(--ink-400);
  font-size: .88rem;
  margin: .6rem 0;
  transition: border-color .15s ease, background .15s ease;
}
.upzone.drag {
  border-color: var(--gold);
  color: var(--gold-text);
  background: var(--gold-light);
}
.modal-foot {
  display: flex;
  gap: .7rem;
  margin-top: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
#toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink-900);
  color: var(--paper);
  border-radius: 999px;
  padding: .6rem 1.5rem;
  font-size: .9rem;
  opacity: 0;
  transition: .25s;
  z-index: 99;
  pointer-events: none;
  max-width: 92vw;
  text-align: center;
  box-shadow: 0 10px 30px rgba(15, 26, 46, .35);
  border: 1px solid rgba(182, 138, 54, .35);
  overflow-wrap: anywhere;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%);
}
#toast.err {
  background: var(--err);
  border-color: rgba(255, 255, 255, .2);
}
.pdock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--ink-900);
  color: var(--paper);
  padding: .7rem 1.2rem;
  z-index: 40;
  box-shadow: 0 -8px 24px rgba(15, 26, 46, .25);
  border-top: 1px solid rgba(182, 138, 54, .35);
}
.pdock .row1 {
  display: flex;
  align-items: center;
  gap: .8rem;
  width: 100%;
  background: none;
  border: none;
  color: inherit;
  font-size: .9rem;
  padding: 0;
  text-align: left;
}
.pdock .tv {
  margin-left: auto;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
  color: var(--gold-hover);
  font-weight: 600;
}
.pdock .detail {
  display: none;
  margin-top: .6rem;
  font-size: .8rem;
  max-height: 44vh;
  overflow-y: auto;
}
.pdock.open .detail {
  display: block;
}
.pdock .stamp-strip {
  justify-content: center;
  gap: 1rem;
}
.pdock .stamp-cap {
  color: rgba(246, 244, 238, .72);
}
@media (max-width: 860px) {
  body[data-route=wizard] main {
    max-width: 74rem;
  }
  .wgrid,
  .dgrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .aside {
    position: static;
  }
  .aside .psum {
    display: none;
  }
  .pdock.on {
    display: block;
  }
  main {
    padding-bottom: 9rem;
  }
  .item-stamp {
    transform: none;
    margin: 0;
  }
  .stamp-strip--lg .stamp-box {
    transform: scale(1.15);
    margin: 0 .6rem .6rem;
  }
}
@media (max-width: 640px) {
  main {
    padding-left: .85rem;
    padding-right: .85rem;
  }
  .card {
    padding: 1rem 1rem;
  }
  .app-head {
    padding: .6rem .85rem;
    gap: .5rem;
  }
  .app-head .brand {
    font-size: .98rem;
    width: 100%;
  }
  .deadline {
    margin-left: 0;
    font-size: .76rem;
  }
  .mainnav {
    padding: .5rem .85rem;
  }
  .mainnav a {
    white-space: nowrap;
  }
  h1.pg {
    font-size: 1.35rem;
  }
  .stat .v {
    font-size: 1.2rem;
  }
  .stat.alert .v {
    font-size: 1.35rem;
  }
  .igrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .stepper {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: .2rem;
  }
  .stp {
    padding: .25rem .45rem .25rem .3rem;
  }
  .stp + .stp {
    margin-left: 14px;
  }
  .stp + .stp::after {
    width: 12px;
  }
  .stepper .stp span.lbl {
    display: none;
  }
  .stepper .stp.active span.lbl {
    display: inline;
  }
  .scen-card {
    padding: .9rem .9rem;
  }
  .scen-ic {
    transform: scale(.85);
    transform-origin: top left;
  }
  .item-body {
    flex-direction: column;
  }
  .item-stamp {
    order: -1;
    align-self: center;
    padding-top: 0;
  }
  .stamp-strip {
    gap: .9rem;
    justify-content: center;
  }
  .wnav .btn {
    flex: 1 1 auto;
  }
  .otbl,
  .otbl[data-t=orders-table],
  .otbl:not([data-t=orders-table]) {
    min-width: 0;
    table-layout: auto;
  }
  .otbl colgroup {
    display: none;
  }
  .otbl thead {
    display: none;
  }
  .otbl tbody {
    display: block;
  }
  .otbl tr.row,
  .otbl tr.norow {
    display: block;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-s);
    margin-bottom: .7rem;
    padding: .5rem .3rem;
    background: var(--card);
  }
  .otbl tr.row td {
    display: flex;
    flex-wrap: wrap;
    border: none;
    padding: .15rem .6rem;
    gap: .6rem;
  }
  .otbl tr.row td > * {
    min-width: 0;
  }
  .otbl tr.row td::before {
    content: attr(data-l);
    font-size: .74rem;
    color: var(--ink-400);
    min-width: 4.5em;
    flex: 0 0 auto;
    padding-top: .15rem;
  }
  .otbl tr.row td.amt {
    text-align: left;
    justify-content: flex-start;
  }
  .otbl tr.row:hover {
    box-shadow: none;
  }
  .otbl tr.norow td {
    display: block;
    border: none;
    text-align: center;
  }
  .sheet {
    min-width: 440px;
    padding: 1.2rem;
    transform: none;
    animation: none;
  }
  .sheet-title {
    font-size: 1.15rem;
  }
  .stbl {
    font-size: .9rem;
  }
  .sheet-wrap {
    padding: 1rem .8rem;
    perspective: none;
  }
  .wstep h2 {
    font-size: 1.25rem;
  }
  .wstep .field > input,
  .wstep .field > textarea,
  .wstep .field > select {
    font-size: 1rem;
  }
  .filters-toggle {
    display: inline-block;
  }
  .filters {
    display: none;
  }
  .filters.open {
    display: flex;
  }
  .actbar--exception::before {
    flex-basis: 100%;
  }
  .qtybar {
    padding: .7rem .9rem;
  }
  .qtybar .qb-n,
  .qtybar--lg .qb-n {
    font-size: 1.75rem;
  }
  .qty {
    padding: .3rem .55rem;
  }
  .igrid .qty-field {
    grid-column: 1/-1;
  }
  .rsum {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .3rem .8rem;
  }
  .kv {
    grid-template-columns: 5.6em minmax(0, 1fr);
  }
  .bigin {
    max-width: 100%;
    font-size: 1.3rem;
  }
  .modal {
    padding: 1.1rem 1rem;
  }
  .lhead {
    gap: .8rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .deadline .dot,
  .deadline.soon .dot {
    animation: none;
  }
  .sheet {
    transform: none;
  }
  .scen-card:hover,
  .mainnav a:hover,
  .btn:not(:disabled):hover {
    transform: none;
  }
  .stamp.is-new {
    animation: none;
  }
}
.gsearch {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-left: auto;
}
.gsearch input {
  width: min(30vw, 22rem);
  min-width: 9rem;
  min-height: 44px;
  padding: .34rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .10);
  color: #fff;
  font-size: .88rem;
}
.gsearch input::placeholder {
  color: rgba(255, 255, 255, .55);
}
.gsearch input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  background: rgba(255, 255, 255, .16);
}
.gsearch button {
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: .3rem .35rem;
  border-radius: 6px;
}
.gsearch button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
@media (max-width: 640px) {
  .app-head {
    flex-wrap: wrap;
  }
  .gsearch {
    order: 9;
    width: 100%;
    margin: .4rem 0 0;
  }
  .gsearch input {
    width: 100%;
  }
  .btn-sm {
    min-height: 44px;
    padding-top: .55rem;
    padding-bottom: .55rem;
  }
  button.badge,
  a.badge {
    min-height: 32px;
    padding-top: .35rem;
    padding-bottom: .35rem;
  }
  .mainnav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-top: .3rem;
    padding-bottom: .3rem;
  }
  .gsearch button {
    min-height: 44px;
    min-width: 44px;
  }
  .item-card .ih .rm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
  }
  .stp {
    min-height: 44px;
    min-width: 44px;
    white-space: nowrap;
  }
  .stp + .stp {
    margin-left: 12px;
  }
  .stp + .stp::after {
    width: 10px;
  }
  .qty .qv {
    min-height: 44px;
    min-width: 44px;
  }
  label:has(> input[type=checkbox]) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .btn {
    min-height: 44px;
  }
  .pdock .row1 {
    min-height: 44px;
  }
  .empty a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
.field-missing {
  border-color: var(--danger, #c0392b) !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .12);
}
.req-invoice {
  color: var(--danger, #c0392b);
  font-size: .78em;
  font-weight: 700;
  margin-left: .35em;
}
.ackbox input[type=checkbox],
#confirm-check,
input[type=checkbox][data-act] {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  accent-color: var(--brand, #123a63);
  cursor: pointer;
}
:where(a, button, input, select, textarea, [tabindex], [role=radio], [role=button]):focus-visible {
  outline: 3px solid var(--focus, var(--ink-600));
  outline-offset: 2px;
  border-radius: 3px;
}
.dupwarn {
  margin-top: .8rem;
  padding: .7rem .8rem;
  border: 1px solid var(--warn, #b8860b);
  border-left-width: 4px;
  border-radius: 6px;
  background: #fffbf0;
  font-size: .88rem;
  line-height: 1.6;
}
.dupwarn a {
  color: inherit;
}
#dupwarn {
  margin-top: 0;
  margin-bottom: .9rem;
}
.dupwarn .dw-foot {
  margin-top: .45rem;
  font-size: .82rem;
  color: var(--ink6, #6b6255);
}
.dropnote {
  margin-top: .8rem;
  padding: .7rem .8rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--info);
  border-radius: 6px;
  background: var(--info-light);
  font-size: .88rem;
  line-height: 1.6;
}
.dropnote .dw-foot {
  margin-top: .45rem;
  font-size: .82rem;
  color: var(--ink-400);
}
.stamp-atomic {
  width: 104px !important;
  height: 52px !important;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 .8rem;
}
.grid3 {
  display: grid;
  grid-template-columns: 5rem 1fr 1fr;
  gap: 0 .8rem;
}
@media (max-width: 640px) {
  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
  }
}
.cm-item {
  border: 1px solid var(--line, #e3ded4);
  border-radius: 8px;
  padding: .7rem .8rem;
  margin-bottom: .7rem;
  background: var(--card);
}
.cm-item-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .4rem;
}
input[type=checkbox],
input[type=radio] {
  min-width: 24px;
  min-height: 24px;
}
.ckbox {
  margin-top: .9rem;
  padding: .8rem;
  border: 1px solid var(--line, #e3ded4);
  border-radius: 8px;
  background: #fbf9f5;
}
.ckq {
  font-size: .86rem;
  color: var(--ink-800, #4a4034);
  margin-bottom: .45rem;
}
.ckword {
  display: inline-block;
  font-family: var(--mono, Consolas, monospace);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--seal);
  background: #FCEEEB;
  border: 1px dashed var(--seal);
  border-radius: 6px;
  padding: .3rem .7rem;
  margin-bottom: .5rem;
  cursor: pointer;
  min-height: 24px;
}
.ckword:hover,
.ckword:focus-visible {
  background: #F8DED8;
}
.ckword::after {
  content: "　點一下帶入";
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: 0;
  opacity: .75;
}
.ckbox input {
  width: 100%;
}
.ckhint {
  min-height: 1.1rem;
  font-size: .8rem;
  margin-top: .25rem;
  color: var(--ink-600, #6b6255);
}
.ckhint.bad {
  color: var(--seal);
}
.stamp-invoice {
  width: 112px !important;
  min-height: 112px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5px;
  padding: 5px 4px;
  line-height: 1.25;
}
.stamp-invoice .il-grid {
  margin: 1px 0;
}
.stamp-invoice .il {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.stamp-invoice .il-big {
  font-size: 1.75em;
  font-weight: 700;
  letter-spacing: .02em;
  margin: .5px 0;
}
.stamp-invoice .il-small {
  font-size: .85em;
  opacity: .8;
}
.sitefoot {
  max-width: 74rem;
  margin: 2rem auto .8rem;
  padding: .7rem 1.2rem 0;
  border-top: 1px solid var(--line, #e3ded4);
  font-size: .74rem;
  color: var(--ink-500, #8a8175);
  display: flex;
  gap: .4rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.sitefoot .sep {
  opacity: .5;
}
.pw-warn {
  color: var(--seal) !important;
  font-weight: 700;
}
.qty-headline {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--ink-800);
  margin: 0 0 .35rem;
}
.qty-headline b {
  font-family: var(--mono);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--gold-text);
}
.qty-headline .qty-detail {
  display: block;
  font-family: var(--sans);
  font-size: .86rem;
  color: var(--ink-400);
  font-weight: 400;
  margin-top: .15rem;
}
.card .row-flex [data-t=order-no] {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-400);
}
.stats {
  margin-top: .6rem;
}
.stat .v {
  font-size: 1.45rem;
}
.stat.alert .v {
  font-size: 1.7rem;
}
.fbtn {
  background: transparent;
  border: 1px solid rgba(246, 244, 238, .35);
  color: var(--paper);
  border-radius: 999px;
  padding: .15rem .8rem;
  font-size: .82rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  transition: background .15s ease;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  white-space: nowrap;
}
.fbtn:hover {
  background: rgba(246, 244, 238, .14);
}
.navbadge {
  display: inline-block;
  min-width: 1.25em;
  padding: 0 .35em;
  margin-left: .3rem;
  background: var(--seal);
  color: #fff;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1.5;
  text-align: center;
}
.fb-ctx {
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-s);
  padding: .6rem .75rem;
  margin: .6rem 0 .8rem;
  font-size: .86rem;
}
.fb-count {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--ink-400);
  text-align: right;
  margin-top: .2rem;
}
.fb-count .over {
  color: var(--seal);
  font-weight: 700;
}
.fb-draft-note {
  color: var(--gold-text);
  font-weight: 600;
}
.fb-mine {
  margin-top: 1.1rem;
  border-top: 1px solid var(--line);
  padding-top: .7rem;
}
.fb-mine h4 {
  margin: 0 0 .5rem;
  font-size: .92rem;
  color: var(--ink-800);
}
.fb-item {
  padding: .55rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.fb-item:last-child {
  border-bottom: 0;
}
.fb-head {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: .82rem;
}
.fb-when {
  color: var(--ink-400);
}
.fb-who {
  font-weight: 600;
  color: var(--ink-800);
}
.fb-status {
  margin-left: auto;
  font-size: .78rem;
  white-space: nowrap;
}
.fb-new {
  color: var(--seal);
  font-weight: 700;
}
.fb-done {
  color: var(--ok);
}
.fb-wont {
  color: var(--ink-400);
}
.fb-body {
  margin: .25rem 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.fb-meta {
  font-size: .75rem;
  color: var(--ink-350);
  word-break: break-all;
}
.fb-errs {
  margin: .3rem 0;
  font-size: .78rem;
}
.fb-errs summary {
  cursor: pointer;
  color: var(--ink-600);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.fb-errs ul {
  margin: .2rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-400);
  word-break: break-word;
}
.fb-reply {
  margin-top: .3rem;
  padding: .35rem .6rem;
  background: var(--gold-light);
  border-radius: var(--radius-s);
  font-size: .85rem;
}
.fb-acts {
  margin-top: .5rem;
}
@media (max-width: 640px) {
  .fbtn-label {
    display: none;
  }
}
.nb-count {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 .4em;
  margin-left: .4rem;
  background: var(--gold);
  color: var(--ink-900);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .9rem;
  text-align: center;
}
.nb-meta {
  margin: .2rem 0 .6rem;
  word-break: break-all;
}
.nb-caveat {
  background: var(--warn-light);
  border: 1px solid var(--warn);
  border-radius: var(--radius-s);
  padding: .55rem .8rem;
  margin: 0 0 .9rem;
  font-size: .86rem;
}
.nb-card {
  padding: .9rem 1rem;
}
.nb-head {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: .4rem;
}
.nb-badge {
  background: var(--gold-light);
  color: var(--gold-text);
  border-radius: 999px;
  padding: .1rem .6rem;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.nb-human .nb-badge {
  background: var(--warn-light);
  color: var(--warn);
}
.nb-title {
  font-size: .9rem;
  color: var(--ink-400);
  word-break: break-all;
}
.nb-fields {
  display: grid;
  gap: .25rem .9rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  font-size: .9rem;
}
.nb-k {
  display: inline-block;
  min-width: 5.2rem;
  color: var(--ink-400);
  font-size: .8rem;
}
.nb-miss {
  color: var(--seal);
}
.nb-src {
  font-size: .75rem;
}
.nb-urgent {
  color: var(--seal);
  font-weight: 700;
}
.nb-missing {
  margin-top: .5rem;
  padding: .35rem .6rem;
  background: var(--warn-light);
  border-radius: var(--radius-s);
  font-size: .84rem;
  color: var(--warn);
}
.nb-dup {
  margin-top: .5rem;
  font-size: .85rem;
}
.nb-acts {
  margin-top: .6rem;
}
.nb-notice {
  border: 2px solid var(--seal);
  background: var(--seal-paper);
  border-radius: var(--radius-s);
  padding: .6rem .8rem;
  margin: .5rem 0;
}
.nb-notice > b {
  color: var(--seal-deep);
  display: block;
  margin-bottom: .25rem;
}
.nb-notice-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .9rem;
}
.nb-notice-wiz {
  margin: .6rem 0 .8rem;
}
.nb-from {
  margin: 0 0 .6rem;
}
