/* 蓝白工具风 · 卡片 + 柔和阴影 + Motion 动效 */

:root {
  --bg: #f4f5f8;
  --card: #ffffff;
  --ink: #0f1319;
  --ink-2: #59626f;
  --ink-3: #8e96a3;
  --line: #eceff4;

  --blue: #2f80ed;
  --blue-2: #1c6de0;
  --blue-soft: #eaf2fe;
  --red: #e5484d;
  --green: #22c55e;

  --radius: 16px;
  --radius-sm: 10px;

  --sh-card: 0 1px 2px rgba(15, 19, 25, .04), 0 10px 24px -18px rgba(15, 19, 25, .22);
  --sh-card-sm: 0 1px 2px rgba(15, 19, 25, .05), 0 6px 14px -12px rgba(15, 19, 25, .2);
  --sh-btn: 0 6px 14px -8px rgba(47, 128, 237, .55);
  --sh-in: inset 0 0 0 1px rgba(15, 19, 25, .05);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --tab-h: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
svg { display: block; }

.app {
  max-width: 600px; margin: 0 auto; min-height: 100vh;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 32px);
}

/* ---------- header ---------- */

.hdr {
  position: sticky; top: 0; z-index: 20;
  height: 58px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr-title { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }

.view { padding: 12px 14px 8px; }

/* ---------- tabbar：浮起的圆角矩形 ---------- */

.tabbar {
  position: fixed; z-index: 30;
  left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: calc(100% - 32px); max-width: 540px;
  height: var(--tab-h);
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 2px 6px rgba(15, 19, 25, .05), 0 14px 32px -14px rgba(15, 19, 25, .28);
  display: flex; align-items: center;
  padding: 0 8px;
}
.tab-blob {
  position: absolute; left: 0; top: 0;
  width: 48px; height: 36px; border-radius: 14px;
  pointer-events: none; will-change: transform;
}
.tab-blob i {
  display: block; width: 100%; height: 100%; border-radius: 14px;
  background: var(--blue-soft);
  will-change: transform;
}
.tabbar a {
  position: relative; z-index: 1;
  flex: 1; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: var(--ink-3); font-size: 10.5px; font-weight: 500;
  transition: color .2s var(--ease);
}
.tabbar .ico {
  width: 48px; height: 36px; border-radius: 14px;
  display: grid; place-items: center;
  transition: transform .22s var(--spring);
}
.tabbar a svg { width: 21px; height: 21px; transition: transform .22s var(--spring); }
.tabbar a.active { color: var(--blue); font-weight: 600; }
.tabbar a.active svg { transform: scale(1.04); }
.tabbar a:active .ico { transform: scale(.92); }
body.no-tab .tabbar { display: none; }

/* ---------- page motion ---------- */

html[data-fx="css"] .pg { animation: pageUp .28s var(--ease) both; }
html[data-fx="css"] .pg[data-dir="r"] { animation-name: pageRight; }
html[data-fx="css"] .pg[data-dir="l"] { animation-name: pageLeft; }

@keyframes pageUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pageRight { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes pageLeft { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

html[data-fx="css"] .stagger > * {
  animation: rowIn .34s var(--ease) both;
  animation-delay: calc(min(var(--i, 0), 9) * 26ms);
}

/* ---------- card ---------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--sh-card);
  overflow: hidden;
}
.card-pad { padding: 18px; }

.sec-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600;
  padding: 16px 16px 0;
  letter-spacing: -.1px;
}
.sec-title::before {
  content: ''; width: 3px; height: 15px; border-radius: 2px;
  background: var(--blue); flex-shrink: 0;
}
.sec-title .tail { margin-left: auto; font-size: 12.5px; font-weight: 400; }

/* ---------- banner ---------- */

.banner {
  position: relative; overflow: hidden;
  height: 112px; border-radius: var(--radius);
  background: linear-gradient(104deg, #2F80ED 0%, #2BA9C8 52%, #22C55E 100%);
  display: grid; place-items: center;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px -14px rgba(47, 128, 237, .55);
}
.banner::before,
.banner::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.banner::before { width: 190px; height: 190px; right: -64px; top: -78px; }
.banner::after { width: 110px; height: 110px; left: -38px; bottom: -62px; background: rgba(255, 255, 255, .09); }

.banner-btn {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; padding: 0 24px;
  border-radius: 23px; border: 1px solid rgba(255, 255, 255, .6);
  background: rgba(255, 255, 255, .24);
  color: #fff;
  font-size: 14.5px; font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: transform .16s var(--ease), background .16s var(--ease);
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .2);
}
.banner-btn:active { transform: translateY(2px) scale(.98); background: rgba(255, 255, 255, .34); }
.banner-btn .plus { font-size: 18px; line-height: 1; transition: transform .24s var(--spring); }
.banner-btn:active .plus { transform: rotate(90deg); }

/* ---------- inventory table ---------- */

.inv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.inv th {
  font-weight: 400; color: var(--ink-3); font-size: 12.5px;
  padding: 14px 6px 10px; text-align: right; white-space: nowrap;
}
.inv th:first-child { text-align: left; padding-left: 16px; }
.inv th:last-child { padding-right: 16px; }
.inv td {
  padding: 12px 6px; text-align: right;
  font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--line);
}
.inv td:first-child { text-align: left; padding-left: 16px; }
.inv td:last-child { padding-right: 16px; }
.inv tbody tr { transition: background .15s ease; }
.inv tbody tr:active { background: #fafbfd; }
.inv .denom { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.inv .sub { color: var(--ink-3); }

/* ---------- issue stats ---------- */

.issue {
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px;
  padding: 12px 16px 2px;
  font-size: 12.5px; color: var(--ink-3);
}
.issue .row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.issue .row b { font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.issue .row b.hi { color: var(--blue); }

.leftbar {
  display: flex; gap: 20px;
  padding: 4px 16px 12px;
  font-size: 12.5px; color: var(--ink-3);
}
.leftbar .row { display: flex; align-items: baseline; gap: 5px; }
.leftbar .row b {
  font-size: 18px; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -.3px;
}

/* ---------- tabs / chips ---------- */

.tabs {
  position: relative;
  display: flex; gap: 4px; padding: 2px 16px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: none; background: none; cursor: pointer;
  padding: 10px 10px 12px; font-size: 13.5px; font-weight: 400;
  color: var(--ink-2); position: relative; white-space: nowrap;
  transition: color .18s ease;
}
.tabs button.on { color: var(--blue); font-weight: 500; }
.tab-line {
  position: absolute; left: 0; bottom: 0;
  height: 2px; width: 0; border-radius: 1px;
  background: var(--blue);
  will-change: transform, width;
}
html[data-fx="css"] .tabs button.on::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 0;
  height: 2px; border-radius: 1px; background: var(--blue);
}

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  height: 38px; padding: 0 16px;
  border-radius: 19px; border: 1px solid #e7eaf0;
  background: #f7f8fa;
  color: var(--ink-2); font-size: 13.5px;
  cursor: pointer;
  transition: transform .15s var(--ease), background .18s ease, border-color .18s ease, color .18s ease;
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--blue-soft); border-color: #bcd6fb; color: var(--blue); font-weight: 500; }

/* ---------- search ---------- */

.search {
  display: flex; align-items: center; gap: 8px;
  height: 40px; margin: 12px 16px;
  padding: 0 14px;
  background: #f4f6f9;
  border-radius: 20px;
  color: var(--ink-3);
  box-shadow: var(--sh-in);
  transition: background .18s ease, box-shadow .18s ease;
}
.search:focus-within { background: #fff; box-shadow: 0 0 0 1px var(--blue), 0 0 0 4px rgba(47, 128, 237, .12); }
.search input {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font-size: 13.5px; height: 100%; color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }
.search svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ---------- code rows ---------- */

.code-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  transition: background .15s ease;
}
.code-row:active { background: #fafbfd; }
.code-row .code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 14px; font-weight: 500; letter-spacing: 1px;
}
.code-row .meta { text-align: right; font-size: 11.5px; color: var(--ink-3); line-height: 1.45; }
.code-row .meta b { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-2); }

/* ---------- forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
input[type=text], input[type=number], input[type=date], input[type=search], select, textarea {
  height: 44px; padding: 0 14px;
  border: none; border-radius: 12px;
  background: #f4f6f9;
  font-size: 14.5px; outline: none; width: 100%;
  box-shadow: var(--sh-in);
  transition: background .16s ease, box-shadow .16s ease;
}
textarea { height: auto; min-height: 78px; padding: 12px 14px; resize: none; border-radius: 12px; }
input:focus, select:focus, textarea:focus {
  background: #fff;
  box-shadow: 0 0 0 1px var(--blue), 0 0 0 4px rgba(47, 128, 237, .12);
}
input::placeholder, textarea::placeholder { color: #b4b9c2; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e96a3' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px;
  border-radius: 12px; border: 1px solid #e7eaf0;
  background: #fff; color: var(--ink);
  font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  box-shadow: var(--sh-card-sm);
  transition: transform .15s var(--ease), background .16s ease, box-shadow .16s ease;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: var(--sh-btn); }
.btn.primary:active { background: var(--blue-2); }
.btn.soft { background: var(--blue-soft); border-color: #c7dcfb; color: var(--blue); box-shadow: none; }
.btn.danger { background: #fff; border-color: #f3c4c5; color: var(--red); box-shadow: none; }
.btn.block { width: 100%; height: 48px; font-size: 15px; border-radius: 14px; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn.link { border: none; background: none; color: var(--blue); padding: 0 2px; height: auto; font-size: 12.5px; box-shadow: none; }
.btn:disabled { opacity: .45; }

.row { display: flex; gap: 8px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

/* ---------- jelly switch ---------- */

.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; margin-bottom: 14px;
  cursor: pointer; user-select: none; padding: 4px 2px;
}
.switch { position: relative; width: 50px; height: 30px; flex: 0 0 50px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; z-index: 2; cursor: pointer; }
.switch i {
  position: absolute; inset: 0; border-radius: 15px;
  background: #e4e8ef;
  transition: background .25s var(--ease);
}
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 19, 25, .22);
  transition: transform .32s var(--spring), width .18s var(--ease);
}
.switch input:checked + i { background: var(--blue); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:active + i::after { width: 30px; }
.switch input:checked:active + i::after { transform: translateX(14px); }

/* ---------- steps ---------- */

.steps { display: flex; align-items: center; padding: 6px 8px 20px; }
.steps .st { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; }
.steps .st .n {
  width: 28px; height: 28px; border-radius: 50%;
  background: #e7eaf0; color: var(--ink-3);
  display: grid; place-items: center; font-size: 12.5px; font-weight: 600;
  z-index: 1;
  transition: background .25s var(--ease), color .25s ease, transform .25s var(--spring);
}
.steps .st .t { font-size: 12.5px; color: var(--ink-3); transition: color .25s ease; }
.steps .st.on .n { background: var(--blue); color: #fff; transform: scale(1.1); box-shadow: 0 4px 10px rgba(47, 128, 237, .3); }
.steps .st.on .t { color: var(--blue); font-weight: 500; }
.steps .st.done .n { background: var(--blue-soft); color: var(--blue); }
.steps .st.done .t { color: var(--ink-2); }
.steps .st::before {
  content: ''; position: absolute; top: 14px; left: -50%; width: 100%;
  height: 1px; background: #e7eaf0;
  transition: background .3s ease;
}
.steps .st:first-child::before { display: none; }
.steps .st.on::before, .steps .st.done::before { background: #bcd6fb; }

/* ---------- flow cards ---------- */

.fcard {
  background: var(--card); border-radius: var(--radius);
  margin-bottom: 12px; padding: 16px;
  box-shadow: var(--sh-card);
  transition: transform .16s var(--ease);
}
.fcard:active { transform: scale(.995); }
.fcard-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fcard-hd .amt { font-size: 20px; font-weight: 600; color: var(--blue); letter-spacing: -.3px; }
.fcard-hd .tm { font-size: 11px; color: var(--ink-3); }
.frow { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; padding: 3.5px 0; }
.frow .k { color: var(--ink-3); flex-shrink: 0; }
.frow .v { text-align: right; word-break: break-all; }
.frow .v.money { color: var(--red); font-weight: 500; }
.code-chip {
  display: inline-block;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12.5px; letter-spacing: .5px;
  background: var(--blue-soft); color: var(--blue);
  padding: 2px 7px; border-radius: 6px; margin: 1px 0;
}
.tag { font-size: 12px; padding: 2px 7px; border-radius: 5px; }
.tag.paid { background: #e7f7ee; color: #12813f; }
.tag.unpaid { background: #fdecec; color: var(--red); }

/* ---------- mine ---------- */

.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats4 .s { text-align: center; padding: 16px 4px; }
.stats4 .s b {
  display: block; font-size: 22px; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1.25; letter-spacing: -.4px;
}
.stats4 .s span { font-size: 11.5px; color: var(--ink-3); }

.stockrow { padding: 10px 16px; }
.stockrow .top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.stockrow .top .cnt { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bar {
  height: 10px; border-radius: 5px;
  background: #eef1f6;
  overflow: hidden;
}
.bar i {
  display: block; height: 100%; border-radius: 5px;
  animation: barGrow .6s var(--ease) both;
  transform-origin: left center;
}
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.line-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px; font-size: 14px;
  border-top: 1px solid var(--line);
}
.line-row:first-child { border-top: none; }
.line-row .r { color: var(--ink-3); font-size: 13px; display: flex; align-items: center; gap: 6px; }

.sync { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 0 6px; font-size: 12.5px; color: var(--ink-3); }
.sync .sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.danger-outline { margin: 12px 0; }
.danger-outline button {
  width: 100%; height: 46px; border-radius: 12px; border: 1px solid #f3c4c5;
  background: #fff; color: var(--red);
  font-size: 14.5px; cursor: pointer;
  transition: transform .14s var(--ease), background .16s ease;
}
.danger-outline button:active { transform: scale(.985); background: #fffafa; }

/* ---------- empty ---------- */

.empty { padding: 44px 16px; text-align: center; color: var(--ink-3); font-size: 13px; }
.empty .t { font-size: 13.5px; color: var(--ink-2); margin-bottom: 4px; }
.empty .s { font-size: 12.5px; margin-bottom: 14px; }

/* ---------- modal ---------- */

.modal-mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 19, 25, .38);
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(2px);
}
html[data-fx="css"] .modal-mask { animation: maskIn .2s ease both; }
html[data-fx="css"] .modal-mask.closing { animation: maskOut .2s ease both; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes maskOut { from { opacity: 1; } to { opacity: 0; } }

.modal {
  width: 100%; max-width: 600px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  max-height: 90vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -10px 40px rgba(15, 19, 25, .18);
}
html[data-fx="css"] .modal { animation: sheetUp .36s var(--ease) both; }
html[data-fx="css"] .modal.closing { animation: sheetDown .22s cubic-bezier(.4, 0, 1, 1) both; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { from { transform: none; } to { transform: translateY(100%); } }

.grabber {
  width: 38px; height: 4px; border-radius: 2px; margin: 9px auto 0; flex-shrink: 0;
  background: #e2e6ec;
}
.modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 0; }
.modal-hd h3 { font-size: 16px; letter-spacing: -.2px; }
.modal-bd { padding: 16px 18px; overflow: auto; -webkit-overflow-scrolling: touch; }
.modal-ft {
  padding: 12px 18px calc(16px + env(safe-area-inset-bottom));
  display: flex; gap: 9px;
  border-top: 1px solid var(--line);
}
.modal-ft .btn { flex: 1; height: 48px; font-size: 15px; border-radius: 13px; }
.x-btn {
  border: none; background: none; color: var(--ink-3); font-size: 22px;
  line-height: 1; padding: 0 4px; cursor: pointer;
  transition: transform .15s var(--ease), color .15s ease;
}
.x-btn:active { transform: rotate(90deg); color: var(--ink); }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 36px);
  transform: translate(-50%, 16px) scale(.96);
  background: rgba(15, 19, 25, .92); color: #fff;
  padding: 10px 18px; border-radius: 10px;
  font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .28s var(--spring);
  z-index: 90; max-width: 80vw; text-align: center;
  backdrop-filter: blur(6px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast.bad { background: rgba(165, 35, 39, .95); }

/* ---------- login ---------- */

.login { max-width: 340px; margin: 0 auto; padding: 74px 22px 0; text-align: center; }
.login .mark {
  width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 18px;
  background: linear-gradient(135deg, #2F80ED, #22C55E);
  color: #fff; display: grid; place-items: center;
  font-size: 26px; font-weight: 600;
  box-shadow: 0 12px 26px -10px rgba(47, 128, 237, .6);
  animation: markIn .5s var(--spring) both;
}
@keyframes markIn { from { opacity: 0; transform: scale(.8) translateY(8px); } to { opacity: 1; transform: none; } }
.login h2 { font-size: 20px; margin-bottom: 6px; letter-spacing: -.3px; }
.login p { font-size: 13px; color: var(--ink-3); margin: 0 0 26px; }

/* ---------- success check ---------- */

.ok-mark { width: 68px; height: 68px; margin: 4px auto 12px; display: block; }
.ok-mark circle {
  stroke: #16a34a; stroke-width: 2.4; fill: rgba(34, 197, 94, .1);
  stroke-dasharray: 152; stroke-dashoffset: 152;
  animation: drawStroke .6s var(--ease) forwards;
}
.ok-mark path {
  stroke: #16a34a; stroke-width: 3.2; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 42; stroke-dashoffset: 42;
  animation: drawStroke .38s .32s var(--ease) forwards;
}
@keyframes drawStroke { to { stroke-dashoffset: 0; } }

/* ---------- misc ---------- */

.hint { font-size: 12px; color: var(--ink-3); }
.divider { height: 1px; background: var(--line); margin: 13px 0; }
.fx-tag { display: none; }
.spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .7s linear infinite;
  display: inline-block; margin-right: 6px; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-7px); }
  38% { transform: translateX(7px); }
  58% { transform: translateX(-4px); }
  78% { transform: translateX(3px); }
}
.shake { animation: shakeX .42s cubic-bezier(.36, .07, .19, .97); }

html[data-fx="motion"] .bar i { animation: none; }

/* ---------- drop zone ---------- */

.drop {
  border: 1.5px dashed #d9dee7;
  border-radius: 15px;
  padding: 38px 16px;
  text-align: center;
  background: #fafbfd;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s var(--ease);
}
.drop:active { background: #fff; border-color: var(--blue); transform: scale(.99); }
.drop .big { font-size: 14.5px; font-weight: 500; margin-bottom: 4px; }
.drop .sm { font-size: 12.5px; color: var(--ink-3); }


/* ---------- 窄屏（320~380） ---------- */

@media (max-width: 380px) {
  .inv { font-size: 12.5px; }
  .inv th { font-size: 11.5px; padding: 12px 3px 9px; }
  .inv td { padding: 11px 3px; }
  .inv th:first-child, .inv td:first-child { padding-left: 14px; }
  .inv th:last-child, .inv td:last-child { padding-right: 14px; }
  .inv .denom { gap: 6px; }

  .issue { grid-template-columns: 1fr; gap: 8px; }
  .issue .row b { font-size: 13.5px; }

  .leftbar { gap: 14px; }
  .leftbar .row b { font-size: 17px; }

  .stats4 .s b { font-size: 19px; }
  .stats4 .s span { font-size: 11px; }
  .fcard-hd .amt { font-size: 18px; }
  .hdr-title { font-size: 16px; }
}

@media (min-width: 601px) {
  .modal-mask { align-items: center; padding: 24px; }
  .modal { border-radius: 20px; max-width: 460px; max-height: 86vh; }
  html[data-fx="css"] .modal { animation: modalIn .26s var(--ease) both; }
  html[data-fx="css"] .modal.closing { animation: modalOut .18s ease both; }
  .grabber { display: none; }
  .modal-hd { padding-top: 18px; }
  @keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes modalOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px) scale(.98); } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
