:root {
  color-scheme: light;
  --bg: #f7f8f2;
  --paper: #fffefa;
  --ink: #1a302a;
  --muted: #54685e;
  --line: #dce3d8;
  --forest: #155444;
  --mint: #d5eeba;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
summary {
  touch-action: manipulation;
}
button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button,
a,
input,
textarea,
summary,
select {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #70a06e;
}
button {
  transition:
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s,
    transform 0.12s var(--ease);
}
button:active:not(:disabled),
a.primary:active {
  transform: scale(0.975);
}
svg {
  flex: none;
  vertical-align: middle;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2.05rem, 3.3vw, 3.35rem);
  letter-spacing: -0.065em;
  line-height: 1.18;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}
p {
  line-height: 1.6;
}
a {
  text-decoration: none;
  color: inherit;
}
[hidden] {
  display: none !important;
}
#app {
  min-height: 100svh;
  outline: none;
}
#app.forward > * {
  animation: enter 0.32s var(--ease);
}
#app.backward > * {
  animation: back 0.3s var(--ease);
}
@keyframes enter {
  from {
    opacity: 0.32;
    transform: translateX(14px);
  }
}
@keyframes back {
  from {
    opacity: 0.3;
    transform: translateX(-14px);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes fade {
  from {
    opacity: 0.2;
  }
}
@keyframes breathe {
  50% {
    opacity: 0.48;
  }
}
.shell {
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 92% 10%, #eaf1df8a, transparent 47%), var(--bg);
}
.mast {
  border-bottom: 1px solid var(--line);
  background: #fcfdf8db;
  padding-top: env(safe-area-inset-top);
}
.mast-inner,
.home-body,
.workspace {
  width: min(1120px, calc(100% - 100px));
  margin: auto;
}
.mast-inner {
  display: flex;
  min-height: 77px;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 0;
  font-size: 1.36rem;
  letter-spacing: -0.05em;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}
.brand span {
  font:
    600 1.06rem Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -0.035em;
  color: var(--forest);
}
.desk-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.desk-nav button,
.install-btn,
.text-btn,
.ghost,
.secondary,
.primary,
.tool,
.small-btn,
.mint,
.mobile-nav button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.desk-nav button,
.install-btn {
  min-height: 42px;
  padding: 0 15px;
  font-size: 0.9rem;
  border-radius: 12px;
  color: var(--muted);
}
.desk-nav .active {
  background: #e9efdf;
  color: #285a44;
}
.install-btn {
  border: 1px solid var(--line);
  color: var(--forest);
  background: var(--paper);
}
.home-body {
  padding: clamp(32px, 5vh, 64px) 0 24px;
}
.introduction,
.sectionbar,
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.introduction {
  align-items: flex-end;
  margin: 0 0 28px;
  animation: rise 0.35s var(--ease);
}
.overline {
  display: flex;
  align-items: center;
  gap: 8px;
  font:
    700 0.69rem/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 0.16em;
  color: #527360;
  margin-bottom: 12px;
}
.overline i {
  width: 20px;
  height: 2px;
  background: #688a64;
}
.title-dot {
  color: #76a46b;
  margin-left: 3px;
}
.introduction p,
.sectionbar p {
  color: var(--muted);
  margin-top: 11px;
}
.introduction time {
  font-size: 0.84rem;
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
  padding-bottom: 3px;
}
.launch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(245px, 1fr);
  gap: 16px;
  animation: rise 0.42s var(--ease) both;
}
.hero {
  position: relative;
  isolation: isolate;
  min-height: 237px;
  background:
    radial-gradient(ellipse at 95% 95%, #428a63, transparent 52%),
    linear-gradient(112deg, #114838, #21694f);
  border-radius: 23px;
  text-align: left;
  width: 100%;
  overflow: hidden;
  color: white;
  box-shadow: 0 8px 18px #204c3814;
}
.hero:before,
.hero:after {
  content: "";
  position: absolute;
  border: 1px solid #deedcb21;
  border-radius: 50%;
  z-index: -1;
  width: 460px;
  height: 460px;
  right: -165px;
  top: -76px;
}
.hero:after {
  width: 400px;
  height: 400px;
  right: -122px;
  top: -43px;
}
.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: 26px 32px;
  width: 64%;
  pointer-events: none;
}
.hero-kicker {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #dbefda;
  font-size: 0.84rem;
}
.hero strong {
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  letter-spacing: -0.065em;
  line-height: 1.25;
  margin-top: 18px;
}
.hero-sub {
  font-size: 0.91rem;
  margin-top: 6px;
  color: #e1eddf;
}
.hero-action {
  margin-top: 21px;
  background: #deefc0;
  color: #194b38;
  display: flex;
  gap: 7px;
  align-items: center;
  border-radius: 20px;
  padding: 9px 15px;
  font-size: 0.84rem;
  font-weight: 700;
}
.hero-art {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) rotate(1deg);
  width: 43%;
  height: 104%;
  object-fit: contain;
  pointer-events: none;
}
.hero:hover .hero-art {
  transform: translateY(-52%) rotate(2.5deg);
  transition: transform 0.32s var(--ease);
}
.quick-links {
  display: grid;
  gap: 13px;
}
.quick {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--paper);
  padding: 19px 22px;
}
.quick:hover,
.docrow:hover {
  background: #f1f6ea;
}
.quick > svg {
  margin-left: auto;
  color: #6d8275;
}
.quick-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #e6efdf;
  color: #35644f;
}
.quick-icon.ochre {
  background: #f3ead8;
  color: #846e41;
}
.quick strong,
.empty strong,
.docrow strong {
  font-size: 1.05rem;
  font-weight: 650;
}
.quick small,
.docrow small,
.panel-title span {
  color: var(--muted);
  font-size: 0.82rem;
  display: block;
  margin-top: 5px;
}
.recent {
  margin: 34px 0 0;
}
.sectionbar {
  min-height: 42px;
  margin: 0 0 13px;
}
.sectionbar h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}
.text-btn {
  color: var(--forest);
  font-size: 0.86rem;
  min-height: 44px;
}
.empty {
  min-height: 145px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 1px dashed #c6d3c2;
  border-radius: 18px;
  background: #fafbf5;
}
.empty img {
  width: 105px;
}
.empty p,
.hint,
.export-caption {
  font-size: 0.87rem;
  color: var(--muted);
  margin-top: 6px;
}
.local-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 29px auto 0;
  font-size: 0.78rem;
  color: #627267;
}
.local-foot span {
  color: #38614a;
  font-weight: 600;
}
.local-foot i {
  width: 3px;
  height: 3px;
  background: #9daf9a;
  border-radius: 50%;
}
.mobile-nav {
  display: none;
}
.doclist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.docrow {
  display: flex;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 8px;
  min-width: 0;
  animation: rise 0.3s var(--ease) var(--delay) both;
}
.document-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
}
.document-open > span:last-child {
  min-width: 0;
}
.docrow strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.docrow small span {
  margin: 0 6px;
}
.doccover {
  width: 41px;
  height: 52px;
  display: grid;
  place-items: center;
  background: #e6eddf;
  border-radius: 6px;
  overflow: hidden;
}
.doccover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.round {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-weight: 700;
}
.library-body .sectionbar {
  margin: 10px 0 26px;
}
.workspace {
  padding-bottom: max(30px, env(safe-area-inset-bottom));
}
.work-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  padding: calc(10px + env(safe-area-inset-top)) 0 10px;
}
.work-top > button {
  justify-self: start;
}
.work-top > div {
  justify-self: end;
}
.work-top > b {
  font-size: 1.02rem;
}
.work-top.light {
  border-bottom: 1px solid var(--line);
}
.workspace-head {
  margin: 26px 0 20px;
}
.workspace-head h1 {
  font-size: 2.3rem;
}
.workspace-head .overline {
  margin-bottom: 6px;
}
.ghost,
.secondary,
.primary,
.small-btn,
.tool,
.mint {
  min-height: 44px;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
}
.ghost {
  color: var(--forest);
}
.secondary,
.small-btn {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--forest);
}
.primary {
  background: var(--forest);
  color: #fff;
}
.primary:hover {
  background: #216b52;
}
.mint {
  color: #173e2f;
  background: var(--mint);
}
.wide {
  width: 100%;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.row.wrap {
  flex-wrap: wrap;
}
.row.center {
  justify-content: center;
}
.edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr);
  gap: 23px;
  align-items: start;
}
.paper-stage {
  height: clamp(290px, 48vh, 580px);
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #edf0e5, #e4e9dd);
  border-radius: 17px;
  padding: 20px 25px 28px;
  overflow: hidden;
  border: 1px solid #dce3d4;
}
.paper {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 5px 18px #233c2c25;
  animation: fade 0.22s var(--ease);
  view-transition-name: scan-paper;
}
.sheet-badge {
  position: absolute;
  right: 10px;
  bottom: 8px;
  display: flex;
  gap: 5px;
  align-items: center;
  border-radius: 20px;
  background: #fffff0e8;
  padding: 4px 8px;
  color: #435648;
  font-size: 0.74rem;
  font-weight: 600;
}
.thumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  overflow-x: auto;
  padding: 13px 2px;
}
.thumb,
.add-thumb {
  position: relative;
  flex: 0 0 46px;
  height: 58px;
  background: #ecf0e6;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.thumb span {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-size: 0.65rem;
  background: #fffe;
  padding: 0 3px;
  border-radius: 3px;
}
.thumb.sel,
.filter.sel,
.segments .sel {
  border-color: #387b54;
  box-shadow: 0 0 0 1px #387b54;
  background: #e8f2dc;
  color: #194c34;
}
.add-thumb {
  border-style: dashed;
  font-size: 1.6rem;
  color: #427450;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 22px;
  min-width: 0;
}
.panel-title {
  margin-bottom: 15px;
}
.panel-title span {
  margin: 0;
}
.filters,
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.filter {
  padding: 7px 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.79rem;
  line-height: 1.3;
  display: grid;
  justify-items: center;
  gap: 4px;
}
.filter-swatch {
  width: 32px;
  height: 35px;
  background: #c3c6ad;
  display: grid;
  place-items: center;
  transform: rotate(-4deg);
  border-radius: 2px;
}
.filter-swatch i {
  width: 20px;
  height: 26px;
  display: block;
  background:
    repeating-linear-gradient(0deg, transparent 0 5px, #8c977d 5px 6px), #e8e2cd;
  border: 3px solid #e8e2cd;
}
.filter-swatch.clear {
  filter: contrast(1.6) brightness(1.1);
}
.filter-swatch.gray {
  filter: grayscale(1);
}
.filter-swatch.bw {
  filter: grayscale(1) contrast(3.6);
}
.adjust {
  margin: 13px 0;
  border-block: 1px solid var(--line);
  font-size: 0.88rem;
}
.adjust summary {
  cursor: pointer;
  padding: 12px 0;
  min-height: 44px;
  color: #496053;
}
.adjust summary svg {
  margin: 0 4px;
}
.adjust label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.83rem;
  padding-bottom: 8px;
}
.adjust input {
  min-width: 0;
  flex: 1;
  accent-color: var(--forest);
}
.adjust output {
  width: 2em;
  text-align: right;
}
.tool {
  flex-direction: column;
  gap: 4px;
  font-size: 0.76rem;
  padding: 8px 1px;
  background: #f3f6ed;
  border-radius: 9px;
}
.panel-bottom {
  display: grid;
  gap: 8px;
  margin-top: 19px;
}
.text-section {
  margin: 19px 0 8px;
}
.text-section label,
.field {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 18px 0 8px;
}
.text-section textarea,
.name-field,
input.rename {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  width: 100%;
  padding: 11px;
}
.text-section textarea {
  min-height: 150px;
  line-height: 1.6;
  resize: vertical;
}
.segments {
  display: flex;
  padding: 4px;
  background: #eef2e8;
  border-radius: 12px;
  gap: 3px;
}
.segments button {
  flex: 1;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.86rem;
}
.hint {
  margin: 10px 0 14px;
}
.small-btn {
  font-size: 0.81rem;
  padding: 7px 10px;
}
.ocr-layout .panel > .secondary:last-child {
  margin-top: 14px;
}
.mobile-page-select {
  display: none;
}
.name-field {
  display: flex;
  align-items: center;
}
.name-field input {
  border: 0;
  min-width: 0;
  width: 100%;
  outline-offset: 0;
  color: var(--ink);
}
.name-field span {
  font:
    0.85rem ui-monospace,
    monospace;
  color: #65796b;
}
.export-caption {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 13px;
}
.export-paper {
  height: clamp(270px, 48vh, 540px);
}
.success {
  font-size: 0.9rem;
  color: #287049;
  display: flex;
  align-items: center;
  gap: 7px;
  animation: rise 0.32s var(--ease);
}
.assembled .paper {
  animation: assemble 0.36s var(--ease);
}
@keyframes assemble {
  from {
    transform: rotate(-3deg) scale(0.94);
  }
}
.dark-work {
  background: #111f1c;
  color: #edf5e8;
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  padding: 0 max(16px, calc((100vw - 900px) / 2))
    max(15px, env(safe-area-inset-bottom));
  background-image: radial-gradient(
    ellipse at 48% 42%,
    #2c433a 0,
    transparent 64%
  );
}
.inverse {
  color: #e7f3e6;
}
.dark-work .work-top {
  color: #f4f7ef;
}
.dark-work .work-top .ghost {
  padding-inline: 4px;
}
.crop-status,
.live-status {
  text-align: center;
  margin: 3px auto;
  font-size: 0.85rem;
  color: #d8edca;
  min-height: 24px;
}
.crop-stage,
.cam-area {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-height: 220px;
}
.crop-stage {
  flex: none;
  height: calc(100svh - 232px);
  max-height: 750px;
}
.crop-image {
  position: relative;
}
.crop-image > #source-view {
  width: 100%;
  height: 100%;
  display: block;
  view-transition-name: scan-paper;
}
.crop-image > svg,
.live-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.mask {
  fill: #09181083;
}
.crop-image polygon,
.live-overlay polygon {
  stroke: #c2f7a8;
  stroke-width: 2;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.handle {
  position: absolute;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%) !important;
  display: grid;
  place-items: center;
  touch-action: none;
  cursor: crosshair;
}
.handle i {
  width: 15px;
  height: 15px;
  border: 3px solid #daffbd;
  border-radius: 50%;
  background: #436447;
  box-shadow: 0 0 0 2px #17351b75;
}
.handle.held i {
  transform: scale(1.26);
  background: #efffcc;
}
.loupe {
  position: absolute;
  top: 6px;
  width: 78px;
  height: 78px;
  pointer-events: none;
  border: 3px solid #e1f6d5;
  border-radius: 50%;
  box-shadow: 0 4px 14px #0006;
}
.dark-tools,
.crop-end,
.camera-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}
.dark-tools button,
.camera-tool {
  min-height: 50px;
  min-width: 67px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.82rem;
  color: #e2ecdd;
}
.crop-end {
  border-top: 1px solid #ffffff23;
  padding-top: 10px;
  margin-top: 8px;
  justify-content: space-between;
}
.crop-end span {
  font-size: 0.83rem;
  color: #cfdbc9;
}
.dark-tools button:focus-visible,
.dark-tools button:hover {
  background: #ffffff12;
  border-radius: 9px;
}
.cam-area {
  min-height: 280px;
}
.camera-frame {
  position: relative;
  aspect-ratio: var(--camera-ratio, 3/4);
  max-height: calc(100svh - 215px);
  width: auto;
  height: calc(100svh - 215px);
  max-width: 100%;
  overflow: hidden;
  background: #172721;
}
.camera-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
}
.live-overlay polygon {
  opacity: 0;
  fill: #a4df9322;
  transition: opacity 0.2s;
}
.camera-message {
  position: absolute;
  z-index: 1;
  padding: 20px;
  text-align: center;
  background: #192a24f5;
  border: 1px solid #364d40;
  border-radius: 18px;
  width: min(350px, 94%);
}
.camera-message strong {
  display: block;
  margin: 8px;
}
.camera-message p {
  font-size: 0.85rem;
  color: #c9d9ca;
}
.cam-symbol {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: auto;
  border-radius: 16px;
  background: #314b3e;
}
.sight {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 0 solid #d2e5bd78;
  animation: breathe 2.7s ease-in-out infinite;
}
.s1,
.s2 {
  top: 8%;
  border-top-width: 2px;
}
.s3,
.s4 {
  bottom: 8%;
  border-bottom-width: 2px;
}
.s1,
.s3 {
  left: 8%;
  border-left-width: 2px;
}
.s2,
.s4 {
  right: 8%;
  border-right-width: 2px;
}
.shutter {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 2px solid #daedd4;
  display: grid;
  place-items: center;
}
.shutter i {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f4f9ef;
}
.camera-controls {
  padding: 10px 0;
  gap: clamp(20px, 7vw, 75px);
}
.camera-tool[aria-pressed="true"] {
  color: #c1ec98;
}
.finish-cam {
  color: #d5eac8;
  min-height: 44px;
}
.flash-frame:after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: white;
  animation: flash 0.14s ease-out forwards;
}
@keyframes flash {
  from {
    opacity: 0.83;
  }
  to {
    opacity: 0;
  }
}
.dropzone:after {
  content: "松开以导入照片";
  position: fixed;
  inset: 12px;
  background: #e4f4dcf2;
  border: 3px dashed #5e865e;
  color: #254e39;
  display: grid;
  place-items: center;
  border-radius: 20px;
  z-index: 8;
  font-weight: bold;
  pointer-events: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--paper);
  color: var(--ink);
  padding: 23px;
  width: min(460px, calc(100% - 28px));
  max-height: 86svh;
  box-shadow: 0 24px 80px #0b281c40;
}
dialog::backdrop {
  background: #12271f78;
}
dialog[open] {
  animation: rise 0.23s var(--ease);
}
dialog h2 {
  margin: 0 0 12px;
}
dialog p {
  color: var(--muted);
  font-size: 0.92rem;
}
dialog button {
  min-height: 44px;
}
.dialog-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.dialog-title h2 {
  margin: 0;
}
.dialog-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.danger {
  color: #9a342b;
}
.orderrow {
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding: 5px 0;
  touch-action: pan-y;
}
.orderrow img {
  width: 33px;
  height: 43px;
  object-fit: contain;
}
.orderrow b {
  margin-right: auto;
  font-size: 0.9rem;
}
.orderrow .grip {
  touch-action: none;
  cursor: grab;
}
.orderrow .round {
  width: 40px;
}
.orderrow.moving {
  background: #e1efdc;
}
.busy-glyph {
  width: 43px;
  height: 53px;
  border: 2px solid #4b7958;
  border-radius: 5px;
  background:
    repeating-linear-gradient(0deg, transparent 0 8px, #d8e4d4 8px 10px),
    #edf3e6;
  position: relative;
  margin: 2px 0 16px;
  overflow: hidden;
}
.busy-glyph:after {
  position: absolute;
  content: "";
  left: 0;
  right: 0;
  height: 3px;
  background: #6d9963;
  animation: sweep 1.4s ease-in-out infinite alternate;
}
@keyframes sweep {
  from {
    transform: translateY(4px);
  }
  to {
    transform: translateY(43px);
  }
}
#busy progress {
  accent-color: var(--forest);
  width: 100%;
  height: 9px;
  margin: 14px 0 20px;
}
#toast {
  position: fixed;
  bottom: max(25px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #1c392d;
  color: white;
  padding: 11px 18px;
  border-radius: 13px;
  max-width: 90vw;
  width: max-content;
  box-shadow: 0 4px 16px #1c392d33;
  font-size: 0.88rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s;
}
#toast.show {
  opacity: 1;
}
@media (max-width: 780px) {
  .mast-inner,
  .home-body,
  .workspace {
    width: calc(100% - 40px);
  }
  .desk-nav {
    gap: 0;
  }
  .mast-inner {
    gap: 10px;
  }
  .quick {
    padding: 13px;
    gap: 9px;
  }
  .launch-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(210px, 1fr);
  }
  .hero-copy {
    padding: 22px;
  }
  .edit-layout {
    gap: 14px;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 1fr);
  }
  .panel {
    padding: 16px;
  }
  .hero-art {
    width: 41%;
  }
}
@media (max-width: 620px) {
  .mast-inner,
  .home-body,
  .workspace {
    width: calc(100% - 36px);
  }
  .mast-inner {
    min-height: 60px;
    justify-content: space-between;
  }
  .mast {
    border-bottom: 0;
    background: transparent;
  }
  .brand img {
    width: 33px;
    height: 33px;
    border-radius: 10px;
  }
  .brand {
    font-size: 1.15rem;
    gap: 7px;
  }
  .brand span {
    font-size: 0.96rem;
  }
  .desk-nav {
    display: none;
  }
  .install-btn {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.77rem;
  }
  .home-body {
    padding: 21px 0 calc(86px + env(safe-area-inset-bottom));
  }
  .introduction {
    margin-bottom: 20px;
  }
  .introduction time {
    display: none;
  }
  .introduction p {
    font-size: 0.9rem;
    margin-top: 7px;
  }
  .overline {
    font-size: 0.63rem;
    margin-bottom: 8px;
  }
  .launch-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .hero {
    min-height: 174px;
    border-radius: 18px;
  }
  .hero-copy {
    padding: 18px 20px;
    width: 64%;
  }
  .hero-kicker {
    font-size: 0.75rem;
  }
  .hero strong {
    margin-top: 12px;
    font-size: 1.95rem;
  }
  .hero-sub {
    font-size: 0.78rem;
    margin-top: 2px;
  }
  .hero-action {
    margin-top: 14px;
    padding: 7px 11px;
    font-size: 0.78rem;
  }
  .hero-art {
    width: 44%;
    right: -0.5%;
    height: 103%;
  }
  .quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .quick {
    padding: 12px 10px;
    border-radius: 13px;
    gap: 8px;
  }
  .quick > svg {
    display: none;
  }
  .quick-icon {
    width: 33px;
    height: 36px;
    border-radius: 10px;
  }
  .quick-icon svg {
    width: 20px;
  }
  .quick strong {
    font-size: 0.9rem;
  }
  .quick small {
    font-size: 0.7rem;
    margin-top: 3px;
  }
  .recent {
    margin-top: 22px;
  }
  .sectionbar {
    margin-bottom: 7px;
  }
  .sectionbar h2 {
    font-size: 1.09rem;
  }
  .empty {
    min-height: 101px;
    gap: 10px;
    border-radius: 13px;
    padding: 10px;
  }
  .empty img {
    width: 69px;
  }
  .empty strong {
    font-size: 0.89rem;
  }
  .empty p {
    font-size: 0.76rem;
    margin-top: 3px;
  }
  .local-foot {
    margin-top: 17px;
    font-size: 0.68rem;
    gap: 5px;
  }
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    display: flex;
    justify-content: space-around;
    background: #fcfdf8f5;
    border-top: 1px solid var(--line);
    padding: 3px 8px calc(3px + env(safe-area-inset-bottom));
  }
  .mobile-nav button {
    flex-direction: column;
    gap: 2px;
    min-width: 63px;
    min-height: 48px;
    font-size: 0.69rem;
    background: none;
    color: #627267;
  }
  .mobile-nav .active {
    color: var(--forest);
  }
  .mobile-nav .active svg {
    background: #e1edd8;
    border-radius: 6px;
    outline: 3px solid #e1edd8;
  }
  .doclist {
    grid-template-columns: minmax(0, 1fr);
  }
  .library-body .sectionbar {
    align-items: end;
  }
  .library-body .sectionbar p {
    font-size: 0.85rem;
  }
  .workspace-head {
    display: none;
  }
  .edit-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .edit-layout > * {
    width: 100%;
  }
  .work-top {
    padding-bottom: 5px;
  }
  .work-top.light {
    margin-bottom: 10px;
  }
  .work-top .ghost {
    padding-inline: 2px;
    font-size: 0.83rem;
  }
  .paper-stage {
    height: clamp(190px, 35svh, 350px);
    padding: 12px 14px 18px;
    border-radius: 13px;
  }
  .thumbs {
    padding: 7px 2px;
  }
  .thumb,
  .add-thumb {
    flex-basis: 37px;
    height: 46px;
  }
  .panel {
    padding: 14px;
    border-radius: 14px;
  }
  .panel-title {
    margin-bottom: 9px;
  }
  .panel h2 {
    font-size: 1.04rem;
  }
  .filter {
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    gap: 4px;
    min-height: 44px;
  }
  .filter-swatch {
    width: 18px;
    height: 23px;
  }
  .filter-swatch i {
    width: 13px;
    height: 17px;
  }
  .panel-bottom {
    margin-top: 12px;
  }
  .adjust {
    margin: 7px 0;
  }
  .tool {
    min-height: 44px;
  }
  .ocr-layout .ocr-image {
    display: none;
  }
  .ocr-layout.show-image .ocr-image {
    display: block;
  }
  .ocr-layout.show-image .paper-stage {
    height: 210px;
  }
  .mobile-page-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.82rem;
  }
  .mobile-page-select select {
    min-height: 39px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 7px;
  }
  .export-paper {
    height: clamp(170px, 29svh, 280px);
  }
  .export-caption {
    margin: 7px 0 10px;
    font-size: 0.78rem;
  }
  .export-layout .field {
    margin: 12px 0 6px;
  }
  .export-layout .hint {
    margin: 7px 0;
  }
  .work-top > b {
    font-size: 0.97rem;
  }
  .dark-work {
    padding-inline: 12px;
  }
  .crop-end {
    padding-inline: 7px;
  }
  .crop-stage {
    height: calc(
      100svh - 218px - env(safe-area-inset-bottom) - env(safe-area-inset-top)
    );
  }
  #toast {
    bottom: calc(62px + env(safe-area-inset-bottom));
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  .dark-work {
    min-height: 100svh;
  }
  .cam-area,
  .crop-stage {
    min-height: 150px;
  }
  .camera-frame {
    max-height: 70svh;
  }
  .camera-controls {
    padding: 3px;
  }
  .shutter {
    width: 48px;
    height: 48px;
  }
  .shutter i {
    width: 38px;
    height: 38px;
  }
  .dark-tools button {
    min-height: 42px;
  }
  .crop-stage {
    height: 48svh;
  }
  .work-top {
    padding-block: 2px;
  }
}
::view-transition-group(scan-paper) {
  animation-duration: 0.38s;
  animation-timing-function: var(--ease);
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.2s;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after,
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .hero:hover .hero-art {
    transform: translateY(-50%);
  }
}

::view-transition {
  pointer-events: none;
}
.captured-sheet {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 95px;
  max-height: 150px;
  object-fit: contain;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 7px 21px #0a1c1430;
}
.camera-work {
  height: 100svh;
  min-height: 440px;
}
.camera-frame {
  max-height: 100%;
}
.cam-area {
  min-height: 0;
}
.copy-area {
  width: 100%;
  height: 160px;
  line-height: 1.5;
  padding: 10px;
  margin-top: 12px;
}
.install-guide {
  margin-top: 14px;
}
.storage-warning {
  padding: 12px;
  background: #fff2cb;
  border-radius: 12px;
  margin-bottom: 16px;
}
@media (max-width: 620px) {
  .quick small {
    white-space: nowrap;
  }
  .hero-sub {
    font-size: 0.76rem;
  }
}
