:root {
  --v3-bg:#f5f3ed;
  --v3-surface:#fffefa;
  --v3-ink:#1d2a24;
  --v3-muted:#6c766f;
  --v3-line:#dcded7;
  --v3-green:#176b4d;
  --v3-green-soft:#e5f1eb;
  --v3-orange:#d8662d;
  --v3-shadow:0 12px 36px rgba(38,48,42,.08);
  color-scheme:light;
  background:var(--v3-bg);
  color:var(--v3-ink);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","PingFang SC","Microsoft YaHei",sans-serif;
}
body { background:var(--v3-bg); color:var(--v3-ink); }
button,input,select { font:inherit; }
input,select { font-size:16px; }
.eyebrow { color:var(--v3-green); letter-spacing:.08em; }
.primary-button { border-color:var(--v3-green); background:var(--v3-green); border-radius:14px; }
.secondary-button { border-color:#9cb9aa; color:var(--v3-green); border-radius:14px; }
.quiet-link,.text-button { color:#496257; }
.card,.empty-state,.summary-grid div { border-color:var(--v3-line); background:var(--v3-surface); box-shadow:none; }
.error { background:#fff1ec; color:#a53616; }

.v3-app-body { min-height:100vh; padding-bottom:calc(82px + env(safe-area-inset-bottom)); }
.v3-page { width:min(100%,920px); margin:auto; padding:20px 18px 40px; }
.v3-narrow { width:min(100%,680px); }
.v3-home-header,.v3-section-head,.v3-subpage-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.v3-home-header { padding:4px 2px 20px; }
.v3-home-header > div { min-width:0; }
.v3-home-header h1,.v3-subpage-head h1 { margin:4px 0 0; font-size:clamp(27px,7vw,38px); letter-spacing:-.035em; }
.v3-home-header h1 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.v3-home-header p { margin:5px 0 0; color:var(--v3-muted); font-size:14px; }
.v3-avatar { display:grid; place-items:center; width:44px; height:44px; flex:0 0 44px; border-radius:50%; background:var(--v3-ink); color:white; font-weight:800; text-decoration:none; }

/* 首页像手机主屏幕：一个图标只表达一个任务。 */
.v3-app-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:22px 7px; padding:14px 4px 22px; }
.v3-app-tile { display:grid; justify-items:center; align-content:start; gap:8px; min-width:0; color:var(--v3-ink); text-decoration:none; -webkit-tap-highlight-color:transparent; }
.v3-app-tile:active .v3-app-icon { transform:scale(.9); filter:brightness(.92); }
.v3-app-tile strong { width:100%; overflow:hidden; text-align:center; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:650; }
.v3-app-icon { display:grid; place-items:center; width:clamp(58px,16vw,68px); height:clamp(58px,16vw,68px); border:1px solid rgba(255,255,255,.48); border-radius:18px; color:white; font-size:34px; font-weight:600; line-height:1; text-shadow:0 1px 1px rgba(0,0,0,.08); box-shadow:0 7px 16px rgba(33,47,40,.16),inset 0 1px 1px rgba(255,255,255,.28); transition:transform .13s ease,filter .13s ease; }
.icon-blue { background:linear-gradient(145deg,#63b9ff,#1877ed); }
.icon-orange { background:linear-gradient(145deg,#ffb15e,#f06a24); }
.icon-green { background:linear-gradient(145deg,#50c98c,#16805a); }
.icon-indigo { background:linear-gradient(145deg,#8193ff,#4c5bca); }
.icon-teal { background:linear-gradient(145deg,#44c8cb,#147c82); }
.icon-amber { background:linear-gradient(145deg,#ffd46b,#e99a18); }
.icon-purple { background:linear-gradient(145deg,#c18cff,#7651c7); }
.icon-slate { background:linear-gradient(145deg,#87999f,#40565d); }

.v3-home-widget { margin-top:12px; padding:18px; border:1px solid rgba(23,107,77,.1); border-radius:24px; background:linear-gradient(145deg,#e5f3eb,#f5f8f3); box-shadow:var(--v3-shadow); }
.v3-home-widget > header,.v3-recent-section > header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.v3-home-widget h2,.v3-recent-section h2 { margin:3px 0 0; font-size:19px; }
.v3-home-widget header > a,.v3-recent-section header > a { padding:8px 12px; border-radius:999px; background:var(--v3-green); color:white; text-decoration:none; font-size:12px; font-weight:800; }
.v3-widget-kicker { color:var(--v3-green); font-size:11px; font-weight:800; letter-spacing:.08em; }
.v3-step-line { display:grid; grid-template-columns:repeat(3,1fr); margin:18px 0 0; padding:0; list-style:none; }
.v3-step-line li { position:relative; display:grid; justify-items:center; gap:6px; color:#486057; font-size:12px; font-weight:700; }
.v3-step-line li:not(:last-child)::after { content:''; position:absolute; top:14px; left:calc(50% + 21px); width:calc(100% - 42px); height:1px; background:#aecabd; }
.v3-step-line b { position:relative; z-index:1; display:grid; place-items:center; width:29px; height:29px; border-radius:50%; background:white; color:var(--v3-green); box-shadow:0 3px 8px rgba(23,107,77,.12); }
.v3-recent-section { margin-top:26px; }
.v3-recent-section > header p { margin:3px 0 0; color:var(--v3-muted); font-size:12px; }
.v3-recent-section header > a { background:#e5ebe7; color:var(--v3-green); }
.v3-recent-strip { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(148px,42%); gap:10px; margin:11px -18px 0; padding:2px 18px 8px; overflow-x:auto; scroll-snap-type:x proximity; }
.v3-recent-strip > a { display:grid; grid-template-columns:38px minmax(0,1fr); gap:2px 9px; align-items:center; min-height:76px; padding:12px; border:1px solid var(--v3-line); border-radius:18px; background:var(--v3-surface); color:var(--v3-ink); text-decoration:none; scroll-snap-align:start; }
.v3-mini-location { grid-row:1/3; display:grid; place-items:center; width:38px; height:38px; border-radius:12px; background:var(--v3-green-soft); color:var(--v3-green); font-size:21px; }
.v3-recent-strip strong,.v3-recent-strip small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.v3-recent-strip strong { font-size:13px; }
.v3-recent-strip small { color:var(--v3-muted); font-size:10px; }
.v3-empty-widget { display:grid; grid-template-columns:48px minmax(0,1fr) 18px; align-items:center; gap:12px; margin-top:18px; padding:16px; border-radius:20px; background:white; color:var(--v3-ink); text-decoration:none; box-shadow:var(--v3-shadow); }
.v3-empty-widget > span { display:grid; place-items:center; width:48px; height:48px; border-radius:15px; background:var(--v3-green); color:white; font-size:28px; }
.v3-empty-widget div { display:grid; gap:3px; }
.v3-empty-widget small { color:var(--v3-muted); }
.v3-empty-widget > b { color:#99a29c; font-size:24px; }
.v3-admin-strip { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:22px; }
.v3-admin-strip > a { display:grid; grid-template-columns:38px minmax(0,1fr); align-items:center; gap:9px; padding:12px; border-radius:17px; background:#ebece7; color:var(--v3-ink); text-decoration:none; }
.v3-admin-strip > a > span { display:grid; place-items:center; width:38px; height:38px; border-radius:11px; background:white; color:var(--v3-green); font-size:21px; font-weight:800; }
.v3-admin-strip div { display:grid; gap:2px; }
.v3-admin-strip strong { font-size:13px; }
.v3-admin-strip small { color:var(--v3-muted); font-size:10px; }

.v3-search-panel { padding:15px; border-radius:22px; background:#173c2f; color:white; box-shadow:var(--v3-shadow); }
.v3-search-page .v3-find-results { max-height:none; }
.v3-search-box { display:grid; grid-template-columns:28px minmax(0,1fr) 28px; align-items:center; gap:6px; min-height:54px; padding:0 12px; border-radius:16px; background:white; color:var(--v3-muted); }
.v3-search-box > span { font-size:25px; line-height:1; }
.v3-search-box input { width:100%; min-width:0; border:0; outline:0; background:transparent; color:var(--v3-ink); }
.v3-search-box button { border:0; border-radius:50%; background:#eef0eb; color:#657068; width:27px; height:27px; cursor:pointer; }
.v3-search-caption { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:13px 3px 8px; color:#c9d7d0; font-size:12px; font-weight:700; }
.v3-badge { padding:4px 8px; border-radius:999px; background:#f3c068; color:#513810; }
.v3-find-results { display:grid; gap:7px; max-height:min(42vh,340px); overflow:auto; overscroll-behavior:contain; }
.v3-find-card { display:grid; grid-template-columns:46px minmax(0,1fr) 18px; align-items:center; gap:11px; min-height:68px; padding:10px; border-radius:14px; background:#fff; color:var(--v3-ink); text-decoration:none; }
.v3-find-card.is-unplaced { background:#fff9ed; }
.v3-find-media { display:grid; place-items:center; width:46px; height:46px; border-radius:12px; object-fit:cover; background:var(--v3-green-soft); color:var(--v3-green); font-size:13px; font-weight:800; }
.v3-find-card.is-unplaced .v3-find-media { background:#f8e2bf; color:#7a5010; }
.v3-find-copy { display:grid; gap:2px; min-width:0; }
.v3-find-copy strong,.v3-find-copy small,.v3-find-copy b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.v3-find-copy strong { font-size:15px; }
.v3-find-copy small { color:#7b847e; font-size:11px; }
.v3-find-copy b { color:var(--v3-green); font-size:12px; }
.v3-find-card.is-unplaced .v3-find-copy b { color:#9a6110; }
.v3-chevron { color:#9ba39d; font-size:25px; }
.v3-loading,.v3-find-empty { padding:20px 12px; text-align:center; color:#c9d7d0; }
.v3-find-empty { display:grid; gap:5px; }
.v3-find-empty small { color:#aebeb6; }

.v3-section { margin-top:28px; }
.v3-section-head { margin-bottom:12px; }
.v3-section-head h2 { margin:0; font-size:21px; letter-spacing:-.02em; }
.v3-section-head p { margin:4px 0 0; font-size:13px; }
.v3-round-action { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:var(--v3-green); color:white; text-decoration:none; font-size:26px; }
.v3-location-groups,.v3-location-grid { display:grid; gap:10px; }
.v3-location-groups { gap:22px; }
.v3-group-title { margin:0 0 8px 3px; color:var(--v3-muted); font-size:13px; }
.v3-location-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.v3-location-card { display:grid; grid-template-columns:42px minmax(0,1fr) 16px; align-items:center; gap:10px; min-height:82px; padding:14px; border:1px solid var(--v3-line); border-radius:18px; background:var(--v3-surface); color:var(--v3-ink); text-decoration:none; }
.v3-location-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:13px; background:var(--v3-green-soft); color:var(--v3-green); font-size:24px; }
.v3-location-copy { display:grid; gap:5px; min-width:0; }
.v3-location-copy strong,.v3-location-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.v3-location-copy small { color:var(--v3-muted); font-size:12px; }
.v3-first-location { display:grid; place-items:center; gap:6px; min-height:168px; padding:24px; border:1.5px dashed #9cb4a7; border-radius:22px; background:rgba(255,255,255,.55); color:var(--v3-ink); text-decoration:none; text-align:center; }
.v3-first-location > span { display:grid; place-items:center; width:54px; height:54px; border-radius:50%; background:var(--v3-green); color:white; font-size:30px; }
.v3-first-location small { color:var(--v3-muted); }
.v3-tools { margin:26px 0 6px; color:var(--v3-muted); }
.v3-tools summary { cursor:pointer; font-size:13px; font-weight:700; }
.v3-tools div { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.v3-tools a { padding:9px 11px; border-radius:10px; background:#ebece7; color:#4d5c54; text-decoration:none; font-size:13px; }

.v3-task-intro { display:grid; gap:5px; margin:-8px 0 16px; padding:15px 16px; border-radius:18px; background:var(--v3-green-soft); color:var(--v3-green); }
.v3-task-intro b { font-size:15px; }
.v3-task-intro span { color:#567065; font-size:12px; line-height:1.5; }
.v3-location-search { display:grid; grid-template-columns:25px minmax(0,1fr) 28px; align-items:center; gap:5px; min-height:52px; margin-bottom:16px; padding:0 13px; border:1px solid var(--v3-line); border-radius:16px; background:white; color:var(--v3-muted); box-shadow:0 5px 15px rgba(38,48,42,.04); }
.v3-location-search > span { font-size:22px; }
.v3-location-search input { min-width:0; border:0; outline:0; background:transparent; }
.v3-location-search button { width:27px; height:27px; padding:0; border:0; border-radius:50%; background:#eef0eb; color:#657068; }
.v3-location-list { display:grid; gap:10px; }
.v3-location-row { display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:11px; min-height:78px; padding:13px; border:1px solid var(--v3-line); border-radius:19px; background:var(--v3-surface); color:var(--v3-ink); text-decoration:none; box-shadow:0 5px 16px rgba(38,48,42,.035); }
.v3-location-row-icon { display:grid; place-items:center; width:48px; height:48px; border-radius:15px; background:var(--v3-green-soft); color:var(--v3-green); font-size:26px; }
.v3-location-row-copy { display:grid; gap:4px; min-width:0; }
.v3-location-row-copy strong,.v3-location-row-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.v3-location-row-copy small { color:var(--v3-muted); font-size:11px; }
.v3-location-row-action { color:var(--v3-green); font-size:12px; font-weight:800; white-space:nowrap; }
.v3-list-empty { padding:35px 12px; text-align:center; color:var(--v3-muted); }
.v3-floating-add { position:fixed; z-index:24; right:max(18px,calc((100vw - 680px)/2 + 18px)); bottom:calc(82px + env(safe-area-inset-bottom)); display:grid; place-items:center; width:54px; height:54px; border-radius:18px; background:var(--v3-green); color:white; text-decoration:none; font-size:31px; box-shadow:0 12px 28px rgba(23,107,77,.3); }
.v3-task-banner { display:grid; gap:3px; margin:0 0 14px; padding:14px 16px; border-radius:16px; background:#fff2d8; color:#6a4610; }
.v3-task-banner strong { font-size:15px; }
.v3-task-banner span { font-size:12px; }

.v3-bottom-nav { position:fixed; z-index:30; left:50%; bottom:0; transform:translateX(-50%); display:grid; grid-template-columns:repeat(4,1fr); width:min(100%,760px); padding:7px 8px calc(7px + env(safe-area-inset-bottom)); border-top:1px solid rgba(110,120,113,.18); background:rgba(255,254,250,.94); backdrop-filter:blur(18px); box-shadow:0 -8px 25px rgba(40,50,44,.07); }
.v3-bottom-nav a { display:grid; place-items:center; gap:2px; min-height:50px; border-radius:13px; color:#6e7872; text-decoration:none; font-size:11px; font-weight:700; }
.v3-bottom-nav a span { font-size:20px; line-height:1; }
.v3-bottom-nav a.is-active { color:var(--v3-green); background:var(--v3-green-soft); }

.v3-subpage-head { justify-content:flex-start; margin-bottom:26px; }
.v3-subpage-head > a { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:white; color:var(--v3-ink); text-decoration:none; font-size:32px; }
.v3-large-field { gap:10px; color:var(--v3-ink); font-size:18px; }
.v3-large-field input { min-height:58px; border:1px solid var(--v3-line); border-radius:16px; padding:12px 14px; background:white; }
.v3-kind-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0; padding:0; border:0; }
.v3-kind-picker legend { grid-column:1/-1; margin-bottom:2px; color:var(--v3-ink); font-weight:800; }
.v3-kind-picker label { position:relative; display:block; cursor:pointer; }
.v3-kind-picker input { position:absolute; opacity:0; pointer-events:none; }
.v3-kind-picker span { display:grid; grid-template-columns:35px 1fr; grid-template-rows:auto auto; align-items:center; gap:2px 9px; min-height:76px; padding:12px; border:1.5px solid var(--v3-line); border-radius:17px; background:white; color:var(--v3-ink); }
.v3-kind-picker b { grid-row:1/3; font-size:26px; color:var(--v3-green); }
.v3-kind-picker small { color:var(--v3-muted); font-size:11px; }
.v3-kind-picker input:checked + span { border-color:var(--v3-green); background:var(--v3-green-soft); box-shadow:0 0 0 2px rgba(23,107,77,.08); }
.v3-counter-card { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:15px; border:1px solid var(--v3-line); border-radius:18px; background:white; }
.v3-counter-card label { color:var(--v3-ink); }
.v3-counter-card input { min-height:50px; border-radius:12px; text-align:center; font-size:20px; font-weight:800; }
.v3-counter-card small { color:var(--v3-muted); font-size:11px; }
.v3-optional-fields { padding:12px 15px; border-radius:14px; background:#eaeae5; }
.v3-optional-fields summary { cursor:pointer; color:#58645d; font-size:13px; font-weight:700; }
.v3-optional-fields > div { margin-top:14px; }
.v3-sticky-submit { position:sticky; bottom:calc(12px + env(safe-area-inset-bottom)); min-height:54px; box-shadow:0 10px 30px rgba(23,107,77,.25); }

.v3-auth-body { min-height:100vh; background:#173c2f; }
.v3-auth-shell { width:min(100%,460px); margin:auto; padding:10vh 18px 32px; }
.v3-brand-panel { display:flex; align-items:center; gap:12px; margin:0 6px 28px; color:white; }
.v3-mark { display:grid; place-items:center; width:50px; height:50px; border-radius:16px; background:#f0b05a; color:#49300d; font-size:23px; font-weight:900; }
.v3-brand-panel div { display:grid; gap:2px; }
.v3-brand-panel strong { font-size:23px; }
.v3-brand-panel small { color:#bcd0c7; }
.v3-auth-card { padding:24px; border-radius:24px; background:var(--v3-surface); box-shadow:0 24px 60px rgba(5,23,16,.24); }
.v3-auth-card header { margin-bottom:20px; }
.v3-auth-card h1 { margin:5px 0 8px; font-size:30px; letter-spacing:-.04em; }
.v3-auth-card p { margin:0; line-height:1.6; }
.v3-auth-card input { min-height:50px; border-radius:13px; }
.v3-auth-card .primary-button { min-height:52px; }

/* V2成熟现场页面在V3中的视觉收口。 */
body[data-shelf-id] { padding-bottom:calc(82px + env(safe-area-inset-bottom)); }
body[data-shelf-id] .page { padding-top:18px; }
body[data-shelf-id] .topbar { padding-bottom:4px; }
body[data-shelf-id] .topbar h1 { font-size:clamp(24px,6vw,34px); }
body[data-shelf-id] .topbar .row { flex-direction:row-reverse; }
body[data-shelf-id] .action-bar { align-items:center; padding:10px 12px; border-radius:14px; background:var(--v3-green-soft); }
body[data-shelf-id] .rack-face { border-color:#b8c0b9; border-radius:18px; box-shadow:var(--v3-shadow); }
body[data-shelf-id] .rack-face-heading { background:#f0f1eb; }
body[data-shelf-id] .rack-level-v2 { border-bottom-color:#6c756e; background:#dfe3dd; }
body[data-shelf-id] .rack-level-label { border-right-color:#6c756e; background:#f6f5f0; }
body[data-shelf-id] .rack-level-label strong { color:var(--v3-ink); }
body[data-shelf-id] .rack-placement-v2 { border-color:var(--v3-green); background:#e7f2ec; color:#164d39; }
body[data-shelf-id] .rack-product-copy b { color:var(--v3-green); }
body[data-shelf-id] .rack-empty { border-color:#aeb7b0; color:#6f7a73; background:#fffefa; }
body[data-shelf-id] .face-tabs button { color:var(--v3-green); background:#e5ebe7; }
body[data-shelf-id] .face-tabs button[aria-selected="true"] { border-color:var(--v3-green); background:var(--v3-green); color:white; }
.operation-sheet { background:var(--v3-bg); color:var(--v3-ink); }
.operation-sheet .sheet-close-row { background:var(--v3-surface); }
.v3-advanced-field { opacity:.7; }

@media (max-width:640px) {
  .v3-page { padding:15px 14px 32px; }
  .v3-app-grid { margin-inline:-4px; }
  .v3-recent-strip { margin-inline:-14px; padding-inline:14px; }
  .v3-location-grid { grid-template-columns:1fr; }
  .v3-location-card { min-height:74px; }
  .v3-search-panel { margin-inline:-2px; }
  .v3-auth-shell { padding-top:7vh; }
  .v3-auth-card { padding:21px 18px; }
  body[data-shelf-id] .topbar { display:grid; gap:10px; }
  body[data-shelf-id] .topbar .row { justify-content:space-between; width:100%; }
  body[data-shelf-id] .action-bar { display:grid; }
  body[data-shelf-id] .action-bar .primary-button { order:2; }
  body[data-shelf-id] .rack-level-v2 { grid-template-columns:54px minmax(0,1fr); }
  body[data-shelf-id] .rack-level-label { padding:8px 5px; }
  body[data-shelf-id] .rack-level-label strong { font-size:15px; }
}

@media (min-width:760px) {
  .v3-location-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

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