:root {
  --page: #f7f8f5;
  --paper: #ffffff;
  --soft: #f0f3ef;
  --ink: #27312e;
  --muted: #7a8982;
  --line: #e8ede8;
  --sage: #4a8d80;
  --sage-soft: #e1f0e9;
  --coral: #e97668;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.update-banner[hidden] { display: none !important; }
.update-banner { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 45; width: min(94vw, 520px); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; border: 1px solid #b8d5c2; border-radius: 14px; background: #f5faf6; box-shadow: 0 10px 30px #263b2d25; color: #30483b; font-size: .84rem; line-height: 1.45; }
.update-banner button { flex: none; min-height: 38px; padding: 7px 12px; border: 0; border-radius: 9px; background: var(--sage); color: white; font-weight: 750; }
.update-banner button:disabled { opacity: .6; }
@media (min-width: 701px) { .update-banner { bottom: 22px; } }

/* Product image is the first optional step in the product editor. */
.product-image-field { gap: 8px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.product-upload { position: relative; display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 10px 12px; border: 1px dashed #9fbeae; border-radius: 13px; background: #f7fbf8; cursor: pointer; text-decoration: none; }
.product-upload:hover { background: #f0f8f3; border-color: var(--sage); }
.product-image-field:focus-within .product-upload { outline: 2px solid var(--sage); outline-offset: 3px; }
.product-upload-media { display: grid; place-items: center; flex: none; width: 49px; height: 49px; overflow: hidden; border-radius: 10px; background: var(--sage-soft); color: var(--sage); }
.product-upload-media svg { width: 26px; height: 26px; }
.product-upload-media img { width: 100%; height: 100%; object-fit: cover; }
.product-upload-copy { display: grid; gap: 3px; min-width: 0; }
.product-upload-copy strong { color: #307963; font-size: .92rem; }
/* The file input itself covers the button: some Android browsers ignore a tap
   on a label that points at a hidden input. */
.product-upload-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; font-size: 0; }
.product-upload-copy small { color: var(--muted); font-size: .71rem; line-height: 1.35; }
.product-price-field, .product-quantity-row { grid-column: 1 / -1; min-width: 0; }
.product-quantity-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-quantity-row .field { min-width: 0; }
.product-remove-image { display: inline-flex !important; align-items: center; gap: 6px; font-size: .78rem !important; color: var(--muted) !important; width: fit-content; }
.product-remove-image input { width: auto !important; min-height: 0 !important; accent-color: var(--sage); }
.product-form-actions { display: flex; gap: 9px; padding: 12px 20px calc(13px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.product-form-actions .button:first-child { flex: 0 0 100px; }
.product-form-actions .button:last-child { flex: 1; background: var(--sage); color: white; border-color: var(--sage); }
.product-form-actions-new .button:first-child { flex-basis: 64px; }
.product-form-actions-new .button:nth-child(2) { flex: 1; }
.product-form-actions .button:disabled { opacity: .55; cursor: wait; }
/* キャンセル is wider than 取消. */
:lang(ja) .product-form-actions .button:first-child { flex-basis: auto; white-space: nowrap; }
@media (max-width: 700px) {
  .product-form-actions-new { display: grid; grid-template-columns: 64px minmax(0, 1fr); }
  .product-form-actions-new .button:last-child { grid-column: 1 / -1; }
  :lang(ja) .product-form-actions-new { grid-template-columns: auto minmax(0, 1fr); }
}
/* The body scrolls and the title and buttons stay in view: subtract their
   height (and the home-indicator space the buttons pad for) from the sheet. */
.sheet-dialog.is-product-editor .dialog-body { max-height: calc(94dvh - 142px - env(safe-area-inset-bottom)); }
@media (max-width: 700px) {
  /* 新建商品 puts 保存并添加下一件 on a second row of buttons. */
  .sheet-dialog.is-product-editor:has(.product-form-actions-new) .dialog-body { max-height: calc(94dvh - 192px - env(safe-area-inset-bottom)); }
}

/* Crop editor: full screen, dark, picture fills the stage. Handles have
   44px touch targets; corners and edges for free crops, corners only for a
   fixed ratio. */
.crop-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: #0f1a15; color: #fff; display: flex; flex-direction: column; overflow: hidden; }
.crop-dialog:not([open]) { display: none; }
.crop-dialog::backdrop { background: #0f1a15; }
.crop-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; }
.crop-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.crop-head button { flex: none; min-width: 64px; min-height: 38px; border: 0; border-radius: 10px; font-weight: 800; font-size: .95rem; }
.crop-cancel { background: #ffffff1f; color: #fff; }
.crop-done { background: var(--sage); color: #fff; }
.crop-done:disabled { opacity: .6; }
.crop-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.crop-stage img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.crop-selection { position: absolute; box-sizing: border-box; border: 2px solid #fff; box-shadow: 0 0 0 200vmax #0f1a15b8; cursor: move; touch-action: none; }
.crop-grid { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 33.1%, #ffffff66 33.3%, #ffffff66 33.6%, transparent 33.8%, transparent 66.2%, #ffffff66 66.4%, #ffffff66 66.7%, transparent 66.9%), linear-gradient(transparent 33.1%, #ffffff66 33.3%, #ffffff66 33.6%, transparent 33.8%, transparent 66.2%, #ffffff66 66.4%, #ffffff66 66.7%, transparent 66.9%); }
.crop-handle { position: absolute; width: 44px; height: 44px; touch-action: none; }
.crop-handle::after { content: ''; position: absolute; border-color: #fff; border-style: solid; filter: drop-shadow(0 1px 2px #0008); }
.crop-handle.nw { left: -22px; top: -22px; cursor: nwse-resize; } .crop-handle.nw::after { left: 18px; top: 18px; width: 18px; height: 18px; border-width: 4px 0 0 4px; }
.crop-handle.ne { right: -22px; top: -22px; cursor: nesw-resize; } .crop-handle.ne::after { right: 18px; top: 18px; width: 18px; height: 18px; border-width: 4px 4px 0 0; }
.crop-handle.sw { left: -22px; bottom: -22px; cursor: nesw-resize; } .crop-handle.sw::after { left: 18px; bottom: 18px; width: 18px; height: 18px; border-width: 0 0 4px 4px; }
.crop-handle.se { right: -22px; bottom: -22px; cursor: nwse-resize; } .crop-handle.se::after { right: 18px; bottom: 18px; width: 18px; height: 18px; border-width: 0 4px 4px 0; }
.crop-handle.n, .crop-handle.s { left: 50%; margin-left: -22px; cursor: ns-resize; } .crop-handle.n { top: -22px; } .crop-handle.s { bottom: -22px; }
.crop-handle.n::after, .crop-handle.s::after { left: 8px; width: 28px; height: 0; border-width: 3px 0 0; border-radius: 3px; } .crop-handle.n::after { top: 19px; } .crop-handle.s::after { bottom: 19px; }
.crop-handle.w, .crop-handle.e { top: 50%; margin-top: -22px; cursor: ew-resize; } .crop-handle.w { left: -22px; } .crop-handle.e { right: -22px; }
.crop-handle.w::after, .crop-handle.e::after { top: 8px; width: 0; height: 28px; border-width: 0 0 0 3px; } .crop-handle.w::after { left: 19px; } .crop-handle.e::after { right: 19px; }
.crop-selection.is-fixed-ratio .crop-handle.n, .crop-selection.is-fixed-ratio .crop-handle.s, .crop-selection.is-fixed-ratio .crop-handle.w, .crop-selection.is-fixed-ratio .crop-handle.e { display: none; }
.crop-size { position: absolute; left: 50%; bottom: -30px; transform: translateX(-50%); padding: 2px 8px; border-radius: 8px; background: #000a; font-size: .72rem; white-space: nowrap; pointer-events: none; }
.crop-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); margin: 0; padding: 5px 12px; border-radius: 999px; background: #000b; font-size: .78rem; white-space: nowrap; pointer-events: none; }
.crop-foot { flex: none; padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); }
.crop-ratios { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.crop-ratios::-webkit-scrollbar { display: none; }
.crop-ratios button { flex: none; min-height: 36px; padding: 6px 14px; border: 0; border-radius: 999px; background: #ffffff1a; color: #d8e4dd; font-weight: 700; font-size: .86rem; }
.crop-ratios button[aria-pressed="true"] { background: #fff; color: #1d3a2f; }
.crop-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.crop-zoom { display: flex; align-items: center; gap: 6px; }
.crop-zoom button { width: 42px; height: 38px; border: 0; border-radius: 10px; background: #ffffff1a; color: #fff; font-size: 1.2rem; font-weight: 800; }
.crop-zoom span { min-width: 48px; text-align: center; color: #c9d6cf; font-size: .86rem; }
.crop-secondary, .crop-reset { min-height: 38px; padding: 6px 12px; border-radius: 10px; font-weight: 700; font-size: .86rem; }
.crop-secondary { border: 1px solid #ffffff40; background: none; color: #fff; }
.crop-reset { border: 0; background: #ffffff1a; color: #fff; }

body { background: var(--page); }
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
button:active:not(:disabled) { transform: scale(.985); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
a { color: var(--sage); }

.topbar {
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  padding-inline: max(20px, calc((100vw - 1040px)/2));
}
.brand { color: var(--ink); font-weight: 750; letter-spacing: -.035em; }
.brand-mark { background: var(--sage-soft); color: var(--sage); font-weight: 850; border-radius: 10px; }
.version-badge { color: var(--muted); border-color: var(--line); font-weight: 600; }
.save-status { color: var(--muted); }
.icon-button { color: var(--sage); background: var(--sage-soft); border: 0; font-size: 1.25rem; }
.icon-button:hover { background: #d2e9dd; }
.desktop-nav-button { border: 0; background: transparent; color: var(--ink); padding: 8px 9px; font-size: .87rem; font-weight: 650; }
.desktop-nav-button:hover { color: var(--sage); }
.back-button { display: none; }
.main-content { width: min(100%, 1040px); padding-top: 30px; }
.event-author-search { display: block; width: 100%; max-width: 480px; margin: 0 0 14px; }
.event-search-summary { color: var(--muted); font-size: .86rem; margin: 0 0 11px; }
.event-search-results { display: grid; gap: 9px; }
.event-search-result { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 13px 15px; color: var(--ink); }
.event-search-result:hover { border-color: #b8d3c5; background: #fbfdfb; }
.event-search-hall { flex: none; display: grid; place-items: center; min-width: 48px; min-height: 43px; padding: 4px 6px; border-radius: 10px; background: var(--sage-soft); color: #397761; font-size: .75rem; font-weight: 800; }
.event-search-identity { flex: 1; min-width: 0; }
.event-search-identity strong, .event-search-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-search-identity strong { font-size: .96rem; }
.event-search-identity small { margin-top: 4px; font-size: .74rem; color: var(--muted); }
.event-search-result .status-pill { flex: none; }
.event-search-chevron { flex: none; color: var(--sage); font-size: 1.45rem; }
.event-search-empty { margin-top: 0; }

h1, h2, h3 { color: var(--ink); }
h1 { letter-spacing: -.045em; font-weight: 780; }
h2 { letter-spacing: -.025em; }
.eyebrow { color: var(--sage); font-size: .72rem; letter-spacing: .07em; font-weight: 750; }
.page-subtitle, .muted, small { color: var(--muted); }
.page-heading { margin-bottom: 22px; }
.section-title { margin-top: 30px; }
.section-title h2 { font-size: 1.05rem; font-weight: 720; }
.count { background: var(--sage-soft); color: var(--sage); }

.card, .empty-state, .settings-card {
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 20px;
  box-shadow: 0 6px 24px #566e6010;
}
.empty-state { border: 1px dashed #cbdcd1; }
.empty-symbol { background: var(--sage-soft); color: var(--sage); }
.event-card { padding: 18px 20px; }
.event-card-button { width: 100%; text-align: left; color: var(--ink); cursor: pointer; }
.event-card-button:hover, .route-hall:hover { border-color: #b8d3c5; background: #fbfdfb; }
.event-card-main { display: grid; gap: 7px; min-width: 0; }
.event-card-title { font-size: 1.1rem; line-height: 1.35; }
.event-card-chevron { justify-self: end; color: var(--sage); font-size: 1.6rem; }
.event-card-button .event-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.route-group .section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.route-date { color: var(--muted); font-size: .8rem; }
.route-hall { width: 100%; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; text-align: left; color: var(--ink); cursor: pointer; }
.route-hall strong, .route-hall small { display: block; }
.route-hall small { margin-top: 5px; }
.route-hall > .route-hall-go { color: var(--sage); }
.event-meta, .hall-card p { color: var(--muted); }
.date-badge { background: var(--sage-soft); color: var(--sage); border-radius: 13px; }
.date-badge span { color: var(--sage); }
.event-card h3 button, .hall-card h3 button { color: var(--ink); }
.hall-card { padding: 20px; }
.hall-card-button { width: 100%; text-align: left; color: var(--ink); cursor: pointer; }
.hall-card-button:hover { border-color: #b8d3c5; background: #fbfdfb; }
.hall-card-title { display: block; font-size: 1.08rem; line-height: 1.35; }
.hall-card-meta { display: block; margin-top: 5px; color: var(--muted); font-size: .86rem; }
.reorder-hint { color: #a2b0a8; font-size: 1.3rem; line-height: 1; }
.booth-reorder-handle { display: flex; align-items: center; gap: 5px; margin: 0 0 7px auto; padding: 3px 9px; border: 0; border-radius: 8px; background: var(--sage-soft); color: var(--sage); font-size: .8rem; font-weight: 700; touch-action: none; }
.booth-reorder-handle:first-letter { font-size: 1.1rem; }
.is-reordering { border-color: var(--sage) !important; box-shadow: 0 10px 28px #4a8d8038; transform: scale(1.015); z-index: 2; }
.reorder-target { outline: 2px dashed var(--sage); outline-offset: 3px; }
.route-sort-mode .bottom-nav { display: none; }
.route-sort-mode .main-content { padding-top: 0; padding-bottom: calc(25px + env(safe-area-inset-bottom)); }
.route-sort-top { position: sticky; top: 66px; z-index: 18; display: grid; grid-template-columns: 62px 1fr 62px; align-items: center; gap: 8px; min-height: 56px; margin: 0 -20px; padding: 6px 20px; background: var(--page); border-bottom: 1px solid var(--line); }
.route-sort-top strong { text-align: center; font-size: 1rem; white-space: nowrap; }
.route-sort-top button { border: 0; background: transparent; color: var(--sage); font-weight: 750; min-height: 42px; padding: 6px 0; }
.route-sort-top .route-sort-cancel { text-align: left; color: var(--muted); }
:lang(ja) .route-sort-top { grid-template-columns: minmax(62px, auto) 1fr minmax(62px, auto); }
:lang(ja) .route-sort-top .route-sort-cancel { white-space: nowrap; }
.route-sort-top .route-sort-done { text-align: right; }
.route-sort-caption { margin: 14px 0 12px; color: var(--muted); font-size: .82rem; }
.route-sort-list { display: grid; gap: 5px; }
.route-sort-row { display: grid; grid-template-columns: 38px 32px minmax(0, 1fr) auto 38px; align-items: center; gap: 6px; min-height: 56px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 2px 8px #566e6009; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
@media (pointer: coarse) { html.route-dragging { overflow: hidden; overscroll-behavior: none; } }
.route-sort-row.is-reordering { background: var(--sage-soft); opacity: .9; }
/* ☰ and the number drag at once (touch-action: none keeps the browser from
   taking the touch over). The grip also covers the row's left padding and the
   gap, so the whole left end of a row is one drag area. */
.route-grip { display: grid; place-items: center; align-self: stretch; height: auto; min-height: 42px; margin: -4px -6px -4px -7px; padding: 4px 6px 4px 7px; touch-action: none; color: var(--sage); font-size: 1.15rem; }
.route-index { display: grid; align-items: center; align-self: stretch; margin: -4px 0; padding: 4px 0; touch-action: none; color: var(--muted); font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.route-identity { display: flex; align-items: center; gap: 8px; min-width: 0; }
.route-text { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.promo-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.promo-actions-label { margin-right: 4px; color: var(--muted); font-size: .82rem; font-weight: 800; }
.booth-manage-actions { margin-bottom: 4px; }
.route-thumb { flex: none; width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--soft); pointer-events: none; -webkit-user-drag: none; user-select: none; }
.route-identity strong { flex: none; color: var(--ink); font-size: .88rem; }
.route-identity small { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .8rem; }
.route-priority { white-space: nowrap; color: var(--sage); background: var(--sage-soft); border-radius: 6px; padding: 3px 5px; font-size: .7rem; font-weight: 700; }
.route-more { display: grid; place-items: center; width: 38px; height: 42px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.4rem; }
.route-more:active { background: var(--soft); }
.route-menu-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.route-position-field { margin-top: 18px; }
@media (max-width: 700px) {
  .route-sort-mode .topbar { height: calc(62px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .route-sort-top { top: calc(62px + env(safe-area-inset-top)); margin: 0 -15px; padding: 6px 15px; }
  .route-sort-row { grid-template-columns: 32px 28px minmax(0, 1fr) auto 36px; gap: 4px; }
  .route-text { display: block; }
  .route-identity strong, .route-identity small { display: block; }
}

.button {
  border-color: var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 650;
}
.button:hover { border-color: #b8d3c5; background: #f9fcfa; }
.button.primary { background: var(--sage); color: white; border-color: var(--sage); }
.button.primary:hover { background: #39796c; border-color: #39796c; }
.button.accent { background: var(--sage-soft); border-color: var(--sage-soft); color: var(--sage); }
.button.danger { color: #b65f55; border-color: #f1ddda; }
.button.small { font-weight: 650; }
.breadcrumb { color: var(--muted); }
.breadcrumb button { color: var(--sage); }

.stat { box-shadow: none; background: var(--paper); padding: 17px 18px; }
.stat-label { color: var(--muted); font-weight: 600; }
.stat-value { color: var(--ink); font-size: 1.35rem; font-weight: 780; }
.stat.highlight { background: var(--sage-soft); border-color: transparent; }
.stats { gap: 9px; }
.hall-stats-section { margin-top: 36px; }

.search, .select, .field input, .field textarea, .field select {
  border-color: #dce7df;
  background: var(--paper);
  border-radius: 11px;
  color: var(--ink);
}
.search:focus, input:focus, textarea:focus, select:focus { outline-color: #a8d0ba; }
.filter-chip { border-color: var(--line); color: #65786f; background: var(--paper); }
.filter-chip.active { background: var(--sage-soft); color: #39796c; border-color: var(--sage-soft); }
.filter-row { gap: 7px; align-items: center; }
/* お品書き 识别 (owner only) */
.button.ai-scan { border-color: #c9b8ec; background: #f3effb; color: #5b4a8a; }
.scan-hint { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding: 8px 10px; border: 1px solid #ddd3f0; border-radius: 12px; background: #f6f2fc; color: #5b4a8a; font-size: .84rem; }
.scan-hint .button { flex: none; }
.scan-picture { position: relative; overflow: hidden; max-height: 46vh; border-radius: 12px; background: var(--soft); }
.scan-picture img { display: block; width: 100%; max-height: 46vh; object-fit: contain; }
.scan-line { position: absolute; left: 0; right: 0; height: 40px; top: 0; background: linear-gradient(180deg, #9fd2b900, #9fd2b9aa, #9fd2b900); animation: scan-move 1.6s ease-in-out infinite alternate; }
@keyframes scan-move { to { top: calc(100% - 40px); } }
.scan-status { margin: 12px 0 0; text-align: center; }
.scan-status b { display: block; }
.scan-status small { color: var(--muted); }
.scan-promos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.scan-promos label { position: relative; display: block; }
.scan-promos img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.scan-promos input { position: absolute; left: 6px; top: 6px; width: 20px; height: 20px; }
.scan-rows { margin: 6px 0; }
.scan-row { display: grid; grid-template-columns: 22px 52px minmax(0, 1fr) 80px; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.scan-cover { position: relative; display: block; width: 52px; height: 66px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.scan-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scan-cover span { position: absolute; right: 2px; bottom: 2px; padding: 0 4px; border-radius: 5px; background: #152b39cc; color: #fff; font-size: .62rem; }
.scan-cover.is-none { display: grid; place-items: center; border-style: dashed; color: var(--muted); font-size: .64rem; line-height: 1.3; text-align: center; }
.scan-use { display: inline-flex; align-items: center; gap: 4px; margin: 3px 0 0 7px; color: #3f7f68; font-size: .74rem; font-weight: 800; }
.scan-use input { width: 15px; height: 15px; margin: 0; }
.scan-use:has(input:disabled) { display: none; }
.scan-row:first-child { border-top: 0; }
.scan-row > input[type="checkbox"] { width: 20px; height: 20px; }
.scan-row.is-existing .scan-main, .scan-row.is-existing .scan-price { opacity: .6; }
.scan-main { min-width: 0; }
.scan-name { width: 100%; min-width: 0; padding: 5px 7px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); font-weight: 800; font-size: 16px; }
.scan-name:focus { border-color: var(--line); background: var(--paper); }
.scan-main small { display: block; margin: 2px 0 0 7px; color: var(--muted); font-size: .76rem; }
.scan-kind { padding: 0 6px; border-radius: 99px; background: #e1f0e9; color: #3d6f62; font-weight: 800; }
.scan-kind.is-goods, .scan-kind.is-other { background: #eceff0; color: #6c7b74; }
.scan-kind.is-free { background: #e3f3ea; color: #2f6f58; }
.scan-price { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font-weight: 800; font-size: 16px; text-align: right; }
.scan-price.is-missing { border-color: #c4554a; }
.scan-warn { margin: 8px 0 0; padding: 7px 9px; border: 1px solid #f1dcae; border-radius: 10px; background: #fff6e6; color: #8a6a2a; font-size: .8rem; }
/* 带多少现金 */
.cash-card { margin-top: 10px; padding: 13px 15px; border-color: #f1dcae; background: #fffaf0; }
.cash-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cash-head b:last-child { font-size: 1.2rem; }
.cash-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.cash-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 5px; border: 1px solid #f1e4c4; border-radius: 10px; background: #fff; font-size: .82rem; }
.cash-chip > span { color: #7a6a44; }
.cash-chip i { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e5e5e5; color: #555; font-style: normal; font-size: .62rem; font-weight: 900; }
.cash-chip i.is-bill { width: 34px; height: 20px; border-radius: 4px; background: #d9e6d5; color: #3f6f52; }
.cash-chip i.is-gold { background: #f3e2b3; color: #6d5a2a; }
.cash-chip i.is-small { width: 22px; height: 22px; background: #efe1cf; color: #7a5a3a; }
.cash-card p { margin: 8px 0 0; color: #8a7a52; font-size: .78rem; }
/* 示例活动 */
.sample-tag { margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: #fff3d6; color: #8a6a2a; font-size: .7rem; font-weight: 800; vertical-align: 2px; }
.sample-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 9px 12px; border: 1px solid #f1dcae; border-radius: 12px; background: #fff6e6; color: #8a6a2a; font-size: .86rem; }
.sample-banner .button { flex: none; color: #a5463a; }
/* 活动总结 */
.summary-card { padding: 16px; border: 1px solid #d3e7db; border-radius: 18px; background: linear-gradient(160deg, #eaf6ef, var(--paper) 60%); }
.summary-brand { display: flex; align-items: center; gap: 8px; color: #3f7f68; font-weight: 900; font-size: .9rem; }
.summary-brand img { width: 30px; height: 30px; border-radius: 50%; }
.summary-total { margin: 10px 0 2px; font-size: 2.2rem; font-weight: 900; }
.summary-total small { margin-left: 6px; color: var(--muted); font-size: .85rem; font-weight: 700; }
.summary-bar { height: 10px; margin: 8px 0 4px; border-radius: 99px; background: #c9b8ec; overflow: hidden; }
.summary-bar i { display: block; height: 100%; background: #9fd2b9; }
.summary-legend { display: flex; justify-content: space-between; color: #2f6f58; font-size: .82rem; font-weight: 700; }
.summary-legend .is-proxy { color: #6b5ca0; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.summary-grid div { padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--muted); font-size: .76rem; text-align: center; }
.summary-grid b { display: block; color: var(--ink); font-size: 1.3rem; }
.summary-budget { margin: 10px 0 0; color: var(--muted); font-size: .85rem; }
.summary-budget .is-ok { color: #2f6f58; } .summary-budget .is-over { color: #a5463a; }
.product-price.is-free { color: #3f7f68; }
/* 排序 ▾ / 标签 ▾: a chip with the real <select> laid over it, invisible. */
.filter-select { position: relative; flex: none; display: inline-flex; align-items: center; white-space: nowrap; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); color: #4e6158; padding: 7px 12px; font-size: .86rem; font-weight: 750; }
.filter-select.active { background: var(--sage-soft); color: #39796c; border-color: var(--sage-soft); }
.filter-select select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.filter-select:focus-within { outline: 2px solid #a8d0ba; outline-offset: 1px; }
.filter-divider { flex: none; width: 1px; height: 20px; background: var(--line); }
.filter-row .filter-chip { flex: none; }
.toolbar:has(.toolbar-more) { align-items: stretch; }
.toolbar-more { flex: none; display: flex; }
.toolbar-more > summary { height: 100%; min-height: 42px; min-width: 44px; font-size: 1.1rem; }
.more-menu-list.toolbar-menu { min-width: 240px; gap: 4px; padding: 10px; }
.toolbar-menu .layout-option { padding: 7px 14px; text-align: center; white-space: nowrap; }
.toolbar-menu-group { display: grid; gap: 6px; padding: 4px 4px 8px; }
.toolbar-menu-group > span { color: var(--muted); font-size: .76rem; font-weight: 700; }
.toolbar-menu-group .layout-switch { justify-content: flex-start; margin: 0; }
.toolbar-menu .toolbar-menu-item { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; white-space: nowrap; }
.booth-list { gap: 14px; }
.booth-card { border: 1px solid var(--line); box-shadow: 0 5px 18px #566e600a; }
.booth-card-openable { cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.booth-card-openable.is-pressed { transform: scale(.992); box-shadow: 0 3px 12px #566e6014; }
.booth-card-openable:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.booth-card-openable .promo-frame[data-action="view-image"] { cursor: zoom-in; }
.booth-section-title { flex-wrap: wrap; }
.booth-section-title h2 { flex: 1 1 auto; }
.booth-card-openable .booth-top { border-bottom: 0; padding-bottom: 6px; }
.booth-top-actions { display: flex; align-items: flex-start; gap: 8px; }
.booth-collapse-button { flex: none; display: grid; place-items: center; width: 42px; height: 42px; margin-top: -3px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); color: var(--sage); font-size: 1.15rem; font-weight: 750; line-height: 1; }
.booth-card.is-collapsed .booth-collapse-button { transform: rotate(180deg); }
.booth-collapse-summary { padding: 0 17px 13px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; line-height: 1.4; }
.booth-card.is-collapsed .booth-collapse-summary { border-bottom: 0; }
.booth-collapsible-content[hidden] { display: none; }
.booth-top { border-bottom-color: var(--line); }
.booth-number { color: var(--ink); }
.booth-circle { color: #586961; }
.booth-author { color: var(--muted); }
.status-pill { background: var(--sage-soft); color: #39796c; }
.status-pill.pending { background: var(--sage-soft); color: #39796c; }
.status-pill.partial { background: #e9f2ed; color: #45856d; }
.status-pill.later { background: #fbf1e5; color: #9c7154; }
.status-pill.complete { background: var(--soft); color: var(--muted); }
.booth-links a, .booth-links button { background: var(--soft); color: var(--sage); }
.promo-frame { background: var(--soft); }
.promo-empty { color: #9aa8a0; }
.promo-add-empty { width: calc(100% - 34px); min-height: 118px; border: 1px dashed #b8d3c5; color: var(--sage); flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 700; }
.promo-add-empty:hover { background: var(--sage-soft); }
.promo-add-symbol { font-size: 1.8rem; line-height: 1; }
.promo-add-overlay { position: absolute; top: 8px; right: 8px; z-index: 2; border: 0; border-radius: 9px; padding: 6px 9px; background: #ffffffed; color: var(--sage); font-size: .78rem; font-weight: 750; box-shadow: 0 2px 8px #27312e28; }
.promo-controls button, .promo-count { background: #354b42d9; }
.product-row { border-top-color: var(--line); }
.compact-page-actions { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.layout-switch { display: flex; justify-content: flex-end; gap: 5px; margin: 0 0 12px; }
.layout-option { border: 1px solid var(--line); background: var(--paper); color: var(--muted); border-radius: 9px; padding: 7px 12px; font-size: .82rem; font-weight: 700; }
.layout-option.active { background: var(--sage-soft); border-color: var(--sage-soft); color: var(--sage); }
.product-row.has-image { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); column-gap: 12px; align-items: start; }
.product-body { min-width: 0; }
.product-main { min-width: 0; }
.product-name { min-width: 0; overflow-wrap: anywhere; }
.product-controls { display: grid; justify-items: start; }
.product-status-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.product-image-button { width: 100%; margin: 0; }
.product-image-button .product-image { width: 100%; max-height: 160px; aspect-ratio: 1; object-fit: contain; background: var(--soft); }
.later-active, .later-tag { background: #fbf1e5; border-color: #e8d6bd; color: #9c7154; }
.later-short { display: none; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-bottom: 12px; }
.product-grid .product-row { display: block; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 11px; }
.product-grid .product-image-button { width: 100%; margin-bottom: 7px; }
.product-grid .product-image { max-height: 125px; }
.product-grid .product-main { display: block; }
.product-grid .product-price { margin-top: 2px; }
.product-grid .stepper { max-width: 100%; }
.product-grid .stepper button { width: 29px; min-width: 29px; }
.product-grid .stepper span { padding: 0 5px; font-size: .76rem; }
.product-grid .mini-action { min-height: 30px; padding: 3px 6px; font-size: .73rem; }
.product-grid .later-full { display: none; }
.product-grid .later-short { display: inline; }
@media (max-width: 380px) { .product-row.has-image { column-gap: 8px; } .product-status-actions { gap: 4px; } .product-row.has-image .mini-action { padding: 3px 6px; } }
.product-image-button { display: block; width: fit-content; max-width: 100%; padding: 0; margin: 8px 0; border: 0; border-radius: 8px; background: transparent; cursor: zoom-in; }
.product-image-button:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.product-image-button .product-image { margin: 0; }
@media (min-width: 800px) { .booth-list .booth-card { height: auto; } }
.product-price { color: var(--ink); }
.priority-dot.must { background: var(--coral); }
.priority-dot.want { background: #7dad98; }
.priority-dot.casual { background: #b4c0b6; }
.tag { background: var(--soft); color: #60746a; }
.priority-tag { background: var(--sage-soft); color: #39796c; }
.stepper { border-color: #d4e2d8; }
.stepper button { background: var(--soft); color: var(--sage); }
.mini-action { border-color: var(--line); color: #667b70; }
.booth-footer { background: #fcfdfa; border-top-color: var(--line); }
.booth-total { color: var(--muted); }
.booth-total strong { color: var(--ink); }

.sheet-dialog, .confirm-dialog { border-radius: 21px; box-shadow: 0 24px 80px #263b2d30; }
.item-conflict-dialog { width: min(94vw, 520px); max-height: min(88dvh, 760px); overflow: auto; border: 0; padding: 0; color: var(--ink); background: var(--paper); }
.item-conflict-dialog .dialog-body { padding: 20px; }
.item-conflict-dialog .dialog-body > p { line-height: 1.6; margin: 0 0 16px; }
.item-conflict-group { border: 1px solid var(--line); border-radius: 14px; padding: 13px; margin: 0 0 15px; min-width: 0; }
.item-conflict-group legend { font-weight: 750; padding: 0 5px; }
.item-conflict-group small { display: block; color: var(--muted); margin-bottom: 9px; }
.item-conflict-group label { display: flex; align-items: center; gap: 12px; padding: 12px; margin: 7px 0; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfb; cursor: pointer; }
.item-conflict-group label:has(input:checked) { border-color: var(--sage); background: #eef7f0; }
.item-conflict-group input { accent-color: var(--sage); flex: none; }
.item-conflict-group span { min-width: 0; overflow-wrap: anywhere; }
.item-conflict-group strong { display: block; color: var(--ink); }
@media (max-width: 700px) { .item-conflict-dialog { position: fixed; top: auto; bottom: 0; left: 0; right: 0; margin: 0; width: 100%; max-width: 100%; max-height: 91dvh; border-radius: 19px 19px 0 0; padding-bottom: env(safe-area-inset-bottom); } }
.sheet-dialog::backdrop, .confirm-dialog::backdrop, .map-dialog::backdrop { background: #27382f99; }
.dialog-head { border-bottom-color: var(--line); }
.close-button { background: var(--soft); color: var(--ink); }
.field label, .field-label { color: #4e6255; }
.tag-choice span { background: var(--soft); color: #557165; border-color: var(--line); }
.tag-choice input:checked + span { background: var(--sage); border-color: var(--sage); color: white; }
.optional-fields { border-top-color: var(--line); }
.optional-fields summary { color: var(--sage); }
.toast { background: #30483b; box-shadow: 0 8px 28px #1f352a30; }
.toast button { color: #c6e8d3; }

.hall-map-preview { border-color: var(--line); box-shadow: 0 6px 24px #566e6010; }
.hall-map-preview-media { background: var(--soft); }
.hall-map-preview-caption { color: var(--sage); }
.hall-map-placeholder { background: var(--paper); color: var(--muted); border-color: #cbdcd1; }
.map-dialog { background: var(--page); overflow: hidden; }
#map-content { height: 100%; min-height: 0; }
.map-shell { height: 100%; min-height: 0; position: relative; }
.map-stage-wrap { position: relative; display: flex; flex: 1 1 0; min-height: 0; }
.map-stage { flex: 1 1 0; min-height: 0; }
.map-toolbar { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); }
.map-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.map-title strong { font-size: .97rem; }
.map-title span { margin-top: 3px; color: var(--muted); font-size: .72rem; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-toolbar .button { background: var(--soft); border: 0; color: var(--ink); }
.map-toolbar .button:hover { background: var(--sage-soft); }
.map-stage { background: #e8ede8; touch-action: pan-x pan-y; }
@media (hover: hover) and (pointer: fine) {
  .map-stage { cursor: grab; }
  .map-stage.is-dragging { cursor: grabbing; user-select: none; }
}
.map-world { box-sizing: border-box; position: relative; }
.map-page { margin: 0; box-shadow: 0 6px 22px #53695a32; touch-action: pan-x pan-y; }
.map-marker {
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  transform: translate(-50%, -50%);
  rotate: none;
  animation: none;
  overflow: visible;
}
.map-marker span { rotate: none; writing-mode: horizontal-tb; }
.map-marker::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  margin: auto;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 1px 5px #29433766;
}
.map-marker.current { background: transparent; box-shadow: none; animation: none; }
.map-marker.current::before { width: 11px; height: 11px; background: var(--coral); }
.map-marker.is-complete::before { background: #b9d8c8; box-shadow: 0 1px 3px #29433735; }
.map-marker.is-later::before { background: #bf9670; }
.map-marker.is-inactive::before { background: #aeb9b1; box-shadow: 0 1px 3px #29433725; }
.map-marker .map-marker-label { display: none; position: absolute; left: calc(50% + var(--label-x, 13px)); top: calc(50% + var(--label-y, -12px)); width: max-content; max-width: min(var(--label-width, 150px), 40vw); min-height: 23px; white-space: nowrap; word-break: keep-all; overflow-wrap: normal; padding: 3px 6px; border: 1px solid #c6ddd0; border-radius: 6px; background: #fffffff0; color: var(--ink); font-size: 10px; font-weight: 750; box-shadow: 0 1px 4px #29433733; align-items: center; gap: 4px; }
.markers-expanded .map-marker .map-marker-label { display: flex; }
.markers-expanded .map-point.is-row-label .map-marker-label { width: var(--label-width); justify-content: center; }
.markers-expanded .map-point.is-row-label::after { content: ''; position: absolute; left: 50%; top: calc(50% + 5px); width: 1px; height: calc(var(--label-y) - 5px); background: #8ab9a4; pointer-events: none; }
.map-marker-name { display: block; min-width: 0; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: keep-all; overflow-wrap: normal; writing-mode: horizontal-tb; }
.map-marker-count { flex: none; font-weight: 900; color: var(--sage); }
.map-marker.is-complete .map-marker-label { color: #7a9887; border-color: #d9e9de; background: #f5faf6f2; }
.map-marker.is-complete .map-marker-count { color: #8cb9a0; }
.map-marker.is-later .map-marker-label { border-color: #ead9c6; background: #fff8eff0; }
.map-marker.is-later .map-marker-count { color: #ad805f; }
.map-marker.is-inactive .map-marker-label { border-color: #e0e5e0; background: #f5f6f3f0; color: #8e9991; }
.map-marker.is-inactive .map-marker-count { color: #8e9991; }
.map-marker-info[hidden] { display: none; }
.map-marker-info { position: absolute; left: 12px; right: 12px; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 12; max-width: 420px; margin: 0 auto; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 10px 36px #253c2c3d; }
.map-marker-info > strong { display: block; padding-right: 30px; overflow-wrap: anywhere; font-size: .98rem; }
.map-info-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 6px 0 12px; color: var(--muted); font-size: .82rem; }
.map-info-meta .is-complete { color: #8cb9a0; }
.map-info-meta .is-later { color: #9c7154; }
.map-info-meta .is-inactive { color: #8e9991; }
.map-info-close { position: absolute; right: 9px; top: 8px; width: 29px; height: 29px; border: 0; border-radius: 8px; background: var(--soft); color: var(--ink); font-size: 1.2rem; }
.map-booth-jump { display: flex; gap: 7px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); overflow-x: auto; background: var(--paper); border-top: 1px solid var(--line); scrollbar-width: thin; }
.map-jump { flex: none; display: flex; align-items: center; gap: 7px; max-width: 155px; min-height: 43px; border: 1px solid #c6ddd0; border-radius: 9px; padding: 5px 8px; background: #f3faf5; color: var(--ink); text-align: left; }
.map-jump-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }
.map-jump-main { display: block; min-width: 0; }
.map-jump-main strong { display: block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.map-jump-main em { color: var(--sage); font-style: normal; }
.map-jump-main small { display: block; color: var(--muted); font-size: .67rem; }
.map-jump.is-complete { background: #f5faf6; border-color: #d9e9de; color: #7a9887; }
.map-jump.is-complete .map-jump-dot, .map-jump.is-complete em { background: #b9d8c8; color: #7a9887; }
.map-jump.is-later { background: #fff8ef; border-color: #ead9c6; }
.map-jump.is-later .map-jump-dot, .map-jump.is-later em { background: #bf9670; color: #9c7154; }
.map-jump.is-inactive { background: #f5f6f3; border-color: #e0e5e0; color: #8e9991; }
.map-jump.is-inactive .map-jump-dot, .map-jump.is-inactive em { background: #aeb9b1; color: #8e9991; }
.map-cluster { display: grid; place-items: center; width: 31px; height: 31px; background: var(--sage); color: white; border: 2px solid white; border-radius: 50%; box-shadow: 0 2px 7px #29433766; font-size: .71rem; font-weight: 800; }
.map-cluster::before { display: none; }
.map-range { width: max-content; min-width: 88px; height: 28px; padding: 0 8px; transform: translate(-50%, -135%); border: 1px solid #a8cdb8; border-radius: 8px; background: #f0f8f1ed; color: #366f5a; box-shadow: 0 2px 7px #29433733; white-space: nowrap; font-size: .75rem; font-weight: 800; }
.map-range::before { position: absolute; left: 50%; top: 100%; width: 7px; height: 7px; margin: 0; transform: translate(-50%, 4px); }
.map-range span { display: inline; margin-left: 5px; color: var(--sage); font-weight: 900; }
.map-range-highlight { position: absolute; z-index: 2; pointer-events: none; border: 1px solid #8aba9760; border-radius: 6px; background: #b6d7bd18; }
.map-cluster-item { display: flex; align-items: center; gap: 7px; min-height: 34px; border: 1px solid var(--line); border-radius: 7px; background: #f8fbf8; padding: 4px 7px; color: var(--ink); }
.map-cluster-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100px; }
.map-cluster-item em { color: var(--sage); font-style: normal; }
.map-cluster-item.is-complete { color: #8eaa98; }
.map-cluster-item.is-later em { color: #9c7154; }
.map-marker:focus-visible { outline: 2px solid var(--sage); outline-offset: 1px; }
.map-stage.is-marking .map-marker { pointer-events: none; opacity: .5; }
.map-crosshair { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%); z-index: 8; pointer-events: none; filter: drop-shadow(0 1px 2px #fff); }
.map-crosshair::before, .map-crosshair::after { content: ''; position: absolute; background: var(--coral); border-radius: 3px; }
.map-crosshair::before { width: 2px; height: 40px; left: 19px; top: 0; }
.map-crosshair::after { height: 2px; width: 40px; left: 0; top: 19px; }
.map-mark-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.map-mark-actions { margin-left: auto; }
.map-mark-actions .button { min-width: 110px; }
.map-mark-confirm { width: 100%; padding-top: 10px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.map-mark-confirm[hidden], .map-cluster-list[hidden] { display: none; }
.map-mark-confirm span { margin-right: auto; color: var(--ink); }
.map-cluster-list { position: relative; padding: 12px 48px 12px 16px; background: var(--paper); border-top: 1px solid var(--line); }
.map-cluster-list strong { display: block; margin-bottom: 8px; font-size: .84rem; }
.map-cluster-list > div { display: flex; flex-wrap: wrap; gap: 6px; max-height: 110px; overflow: auto; }
.map-cluster-dismiss { position: absolute; right: 12px; top: 8px; border: 0; background: var(--soft); border-radius: 7px; width: 28px; height: 28px; }
.map-touch-hint { background: #30483bd9; }
.map-stage.is-marking .map-touch-hint { bottom: 54px; }

.bottom-nav { background: var(--paper); border-top-color: var(--line); box-shadow: 0 -4px 18px #566e6010; }
.nav-item { color: #9aa8a0; }
.nav-item.active { color: var(--sage); }
.nav-icon { font-weight: 750; }

.notes-list { display: grid; gap: 10px; }
.note-search { width: 100%; margin: 0 0 14px; }
.note-search-empty { color: var(--muted); text-align: center; padding: 30px 0; }
.note-card { width: 100%; padding: 18px 20px; display: grid; gap: 7px; text-align: left; color: var(--ink); }
.note-card[hidden] { display: none; }
.note-card:hover { border-color: #b8d3c5; background: #fbfdfb; }
.note-card strong { font-size: 1.03rem; }
.note-card-preview { color: #64766c; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-card small { font-size: .74rem; }
.note-editor { max-width: 760px; margin: 0 auto; }
.note-editor-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.note-back { background: none; border: 0; color: var(--sage); padding: 8px 0; font-weight: 700; }
.note-paper { min-height: 65vh; padding: 26px 30px; }
.note-paper input, .note-paper textarea { display: block; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.note-paper input { font-size: 1.45rem; font-weight: 750; line-height: 1.4; }
.note-paper input::placeholder, .note-paper textarea::placeholder { color: #a4b1a8; }
.note-paper textarea { min-height: 50vh; resize: vertical; line-height: 1.75; font-size: 1rem; }
.note-paper input:focus, .note-paper textarea:focus { outline: 0; }
.note-date { margin: 12px 0 16px; color: var(--muted); font-size: .76rem; }

@media (max-width: 700px) {
  .topbar { height: 62px; padding: 0 15px; justify-content: space-between; }
  .brand { position: absolute; left: 50%; transform: translateX(-50%); font-size: 1.01rem; white-space: nowrap; }
  .brand:active:not(:disabled) { transform: translateX(-50%) scale(.985); }
  .brand-mark, .version-badge { display: none; }
  .topbar-actions { width: 100%; justify-content: space-between; flex-direction: row-reverse; }
  .desktop-nav-button { display: none; }
  .backup-button { display: none; }
  .back-button:not([hidden]) { display: grid; place-items: center; }
  .save-status { font-size: .66rem; max-width: 85px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .icon-button { width: 36px; height: 36px; border-radius: 11px; }
  .main-content { padding: 22px 15px calc(100px + env(safe-area-inset-bottom)); }
  .note-paper { padding: 20px 19px; min-height: 60vh; }
  .note-paper textarea { min-height: 48vh; }
  .page-heading h1 { font-size: 1.85rem; }
  .page-heading { gap: 14px; }
  .event-card { padding: 16px; }
  .event-card-button { grid-template-columns: 51px minmax(0, 1fr) 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-height: 77px; padding: 12px 13px; }
  .stat-value { font-size: 1.22rem; }
  .map-toolbar { gap: 7px; padding-bottom: 8px; }
  .map-toolbar .page-actions { width: 100%; justify-content: space-between; }
  .map-toolbar .button { min-width: 31px; }
  .map-title span { max-width: 70vw; }
  .map-stage { min-height: 0; }
}

/* The back button names the page it returns to and replaces breadcrumbs. */
.back-button:not([hidden]) { display: inline-flex; align-items: center; gap: 2px; min-height: 36px; max-width: 220px; padding: 0 10px 0 6px; border: 0; border-radius: 11px; background: var(--sage-soft); color: var(--sage); font-weight: 700; font-size: .88rem; }
.back-arrow { font-size: 1.5rem; line-height: 1; margin-top: -2px; }
.back-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#topbar-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-heading { align-items: center; margin-bottom: 16px; }
.compact-heading .heading-main { min-width: 0; }
.compact-heading h1 { font-size: clamp(1.35rem, 4.5vw, 1.9rem); margin: 0 0 4px; overflow-wrap: anywhere; }
.compact-heading .page-subtitle { margin: 0; font-size: .86rem; }
@media (max-width: 700px) {
  .back-button:not([hidden]) { max-width: 26vw; }
  .brand { max-width: 38vw; }
  .compact-heading { flex-direction: row; align-items: center; gap: 10px; margin: 0 0 14px; }
  .compact-heading .page-actions { flex-wrap: nowrap; flex-shrink: 0; gap: 6px; }
  .compact-heading h1 { font-size: 1.4rem; }
}

/* Thumbnail mode on route cards: promo at the card top, product photos at the
   start of each row; empty slots keep product names aligned. */
.display-switches { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.display-switches .layout-switch { margin: 0; }
.promo-thumb { position: relative; flex-shrink: 0; width: 52px; height: 64px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--soft); cursor: zoom-in; }
.promo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.promo-thumb-count { position: absolute; right: 3px; bottom: 3px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--ink); color: #fff; font-size: .7rem; font-weight: 750; line-height: 18px; text-align: center; }
.booth-top-actions:has(.promo-thumb) { align-items: flex-start; }
.product-image-placeholder { display: none; }
.compact-media .product-row { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; align-items: start; }
.compact-media .product-image-button { width: 42px; height: 42px; margin: 2px 0 0; }
.compact-media .product-image-button .product-image { width: 42px; height: 42px; max-height: none; margin: 0; aspect-ratio: 1; object-fit: cover; border-radius: 7px; }
.compact-media .product-image-placeholder { display: block; width: 42px; height: 42px; margin-top: 2px; border: 1px dashed var(--line); border-radius: 7px; }
.compact-media .product-row.muted { display: block; }
.image-viewer .viewer-nav { top: 50%; right: auto; transform: translateY(-50%); font-size: 2rem; padding: 4px 12px; }
.image-viewer .viewer-prev { left: 10px; }
.image-viewer .viewer-next { left: auto; right: 10px; }
.image-viewer .viewer-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; background: #ffffff20; border-radius: 9px; padding: 3px 10px; font-size: .85rem; }

/* List rows: quantity stepper and status buttons share one row, filling the
   width instead of stacking; they wrap only when the row is too narrow. */
.product-list-mode .product-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.product-list-mode .product-status-actions { gap: 4px; }
.product-list-mode .mini-action { padding: 4px 7px; }
.product-list-mode .stepper button { width: 32px; }
.product-list-mode .later-full { display: none; }
.product-list-mode .later-short { display: inline; }

.priority-labels { display: grid; gap: 10px; margin-top: 4px; }
.priority-label-row { display: grid; grid-template-columns: 10px 3.2em minmax(0, 1fr); align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); }
.priority-label-row input { min-height: 40px; border: 1px solid #bdcfd5; border-radius: 10px; padding: 8px 11px; background: #fff; color: var(--ink); width: 100%; }
.priority-label-row .priority-dot { margin: 0; width: 10px; height: 10px; }

/* Hall map actions sit in a ⋯ menu beside the section title. */
.more-menu { position: relative; }
.more-menu > summary { list-style: none; min-width: 40px; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 140px; display: grid; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px #27312e26; }
.more-menu-list button { text-align: left; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-weight: 700; }
.more-menu-list button:hover { background: var(--soft); }
.more-menu-list .danger { color: #a63736; }
.hall-map-file { margin: 6px 2px 0; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-danger-zone { order: 99; border-top: 1px solid #efdcdb; padding-top: 12px; }
/* Booth map button follows the circle name instead of taking its own row. */
.booth-map-button { margin-left: 8px; padding: 3px 9px; border: 0; border-radius: 7px; background: var(--soft); color: var(--sage); font-size: .78rem; font-weight: 700; vertical-align: middle; white-space: nowrap; }
/* Small buttons on the booth page keep their look but take a thumb-sized
   (44px) tap area. Not on hall-list cards: there the larger area would cover
   the booth number, which opens the booth. */
.booth-card:not(.booth-card-openable) .booth-map-button, .booth-fav, .booth-links [data-action="mark-map"] { position: relative; }
.booth-card:not(.booth-card-openable) .booth-map-button::after, .booth-fav::after, .booth-links [data-action="mark-map"]::after { content: ''; position: absolute; top: 50%; left: -4px; right: -4px; height: 44px; transform: translateY(-50%); }

/* The image viewer zooms the image itself; the page never zooms. */
.image-viewer { touch-action: none; overflow: hidden; }
.image-viewer img { touch-action: none; user-select: none; -webkit-user-select: none; transform-origin: center; transition: transform .05s linear; will-change: transform; }
.image-viewer.is-zoomed img { cursor: grab; }
.image-viewer .viewer-hint { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); color: #ffffffb0; font-size: .78rem; pointer-events: none; }
.image-viewer.is-zoomed .viewer-hint, .image-viewer.is-zoomed .viewer-nav { display: none; }
/* iOS zooms the whole page when an input under 16px gets focus. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(#note-title), select, textarea { font-size: 16px !important; }
}

/* Map: the sharp visible-area layer sits over the whole-page canvas and under
   markers; the marking footer keeps one height so the crosshair never moves. */
.map-page .map-detail { position: absolute; z-index: 1; pointer-events: none; }
.map-page .map-marker, .map-page .map-range-highlight { z-index: 5; }
.map-mark-footer { flex-wrap: nowrap; min-height: calc(68px + env(safe-area-inset-bottom)); gap: 10px; }
.map-mark-footer [data-map-mark-hint] { flex: 1; min-width: 0; line-height: 1.35; }
.map-mark-actions[hidden] { display: none; }
.map-mark-confirm { width: auto; padding-top: 0; border-top: 0; margin-left: auto; flex-wrap: nowrap; }
.product-paste-image { justify-self: start; margin-top: 2px; font-size: .86rem; }

/* Fallback paste target: the system long-press 粘贴 menu works here. */
.paste-box { min-height: 120px; margin: 10px 0; border: 2px dashed var(--sage); border-radius: 12px; background: var(--soft); padding: 12px; color: transparent; caret-color: var(--sage); outline: none; -webkit-user-select: text; user-select: text; }
.paste-box:focus { border-style: solid; }
.paste-box-message { min-height: 1.4em; color: #a14d37; font-size: .9rem; }

/* Route order on the map: numbers on markers and the list, and a 下一摊
   button that walks the route through booths still to visit. */
.map-marker .map-route-no { flex: none; align-self: center; min-width: 17px; height: 17px; margin-right: 4px; padding: 0 4px; border-radius: 9px; background: var(--sage); color: #fff; font-size: .66rem; font-weight: 800; line-height: 17px; text-align: center; }
.map-marker.is-complete .map-route-no, .map-marker.is-inactive .map-route-no { background: #b4c0b6; }
.map-jump-no { flex: none; min-width: 20px; height: 20px; border-radius: 10px; background: var(--sage); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; padding: 0 5px; }
.map-jump.is-complete .map-jump-no, .map-jump.is-inactive .map-jump-no { background: #b4c0b6; }
.map-next-booth { position: absolute; top: 10px; right: 10px; z-index: 9; display: grid; justify-items: center; gap: 1px; padding: 8px 14px; border: 0; border-radius: 14px; background: var(--sage); color: #fff; box-shadow: 0 6px 18px #27312e40; }
.map-next-booth strong { font-size: .95rem; }
.map-next-booth strong, .map-next-booth small { color: #fff; }
.map-next-booth small { font-size: .7rem; opacity: .92; }
.map-next-booth:disabled { background: #b4c0b6; opacity: 1; }
.map-next-booth[hidden] { display: none; }

/* Optional product names: photo rows lead with the price, rows without a
   photo get a faint 商品 N; 新刊 / 既刊 chips fill the name in one tap. */
.product-name-price { font-weight: 800; }
.product-unnamed { color: #9aa8a1; font-weight: 600; font-size: .9em; }
.name-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.name-chip { min-height: 34px; padding: 4px 14px; border: 1px solid #c6ddd0; border-radius: 999px; background: #f3faf5; color: #3d6f62; font-weight: 700; }
.name-chip.is-on { background: var(--sage); border-color: var(--sage); color: #fff; }

/* Priority colours live on the small tag and dot only. Handled items (bought,
   sold out, abandoned) fold into one line at the end of the booth; opened,
   they read grey with dark text and a solid state label. */
.priority-dot.casual { background: #8ea6c8; }
.priority-must .priority-tag { background: #f8d6cf; color: #a5463a; }
.priority-want .priority-tag { background: #d3eadf; color: #2f6f58; }
.priority-casual .priority-tag { background: #d9e3f1; color: #47618a; }
.product-row.is-handled .product-name, .product-row.is-handled .product-price { color: #59625e; }
.product-row.is-handled .priority-dot { background: #b0b7b3; }
.product-row.is-handled .tag { background: #e0e3e1; color: #6a736f; }
.product-row.is-handled .tag.state-tag { background: #5f6864; color: #fff; }
.product-row.is-handled .product-image { filter: grayscale(1); opacity: .75; }
.product-row.is-gone .product-price { text-decoration: line-through; }
/* Items still to buy carry a thin bar in their priority colour; handled
   items inside the fold have none. */
.product-row.priority-must { --bar: #e07a6a; }
.product-row.priority-want { --bar: #6fae93; }
.product-row.priority-casual { --bar: #8ea6c8; }
.product-list-mode > .product-row:not(.muted) { position: relative; padding-left: 14px; }
.product-list-mode > .product-row:not(.muted)::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 2px; background: var(--bar, transparent); }
.product-grid > .product-row:not(.muted) { border-left: 4px solid var(--bar, var(--line)); }
.handled-fold { border-top: 1px solid var(--line); margin-top: 2px; }
.product-grid .handled-fold { grid-column: 1 / -1; }
.handled-fold summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding: 8px 2px; list-style: none; cursor: pointer; color: #5f6b65; font-size: .9rem; font-weight: 700; }
.handled-fold summary::-webkit-details-marker { display: none; }
.handled-fold summary b { color: var(--sage); }
.handled-toggle::after { content: '展开 ⌄'; color: var(--muted); font-weight: 600; white-space: nowrap; }
.handled-fold[open] .handled-toggle::after { content: '收起 ⌃'; }
:lang(ja) .handled-toggle::after { content: '開く ⌄'; }
:lang(ja) .handled-fold[open] .handled-toggle::after { content: '閉じる ⌃'; }
.handled-fold .product-row:first-child { border-top: 1px dashed var(--line); }
.product-grid .handled-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* Search, order and tag filter share one row on phones. */
.toolbar { flex-wrap: nowrap; }
.toolbar .search { flex: 1 1 0; min-width: 0; }
.toolbar .select { flex: none; max-width: 32%; padding-right: 6px; }

/* Keep the viewer's buttons above a zoomed picture so × stays reachable. */
.image-viewer button, .image-viewer .viewer-count { z-index: 2; }

/* Priority in the product form: three buttons, one tap to choose. */
.priority-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.field .priority-option { position: relative; font-size: 1rem; }
.priority-option input { position: absolute; opacity: 0; pointer-events: none; }
.priority-option span { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: #5f6b65; font-weight: 800; text-align: center; overflow-wrap: anywhere; cursor: pointer; }
.priority-option .priority-dot { flex: none; margin: 0; }
.priority-option input:focus-visible + span { outline: 2px solid var(--sage); outline-offset: 2px; }
.priority-option.must input:checked + span { background: #f8d6cf; border-color: #e07a6a; color: #a5463a; }
.priority-option.want input:checked + span { background: #d3eadf; border-color: #6fae93; color: #2f6f58; }
.priority-option.casual input:checked + span { background: #d9e3f1; border-color: #8ea6c8; color: #47618a; }

/* Event search: spending totals for everything the search matched. */
.search-total { margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
.search-total h3 { margin: 0 0 8px; color: #5f6b65; font-size: .92rem; font-weight: 700; overflow-wrap: anywhere; }
.search-total-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.search-total-nums div { padding: 8px 4px; border-radius: 10px; background: var(--soft); text-align: center; }
.search-total-nums small { display: block; color: var(--muted); font-size: .74rem; }
.search-total-nums strong { font-size: 1.02rem; }
.search-total-nums .is-bought strong { color: #2f6f58; }
.search-total-nums .is-left strong { color: #a5463a; }
.search-total p { margin: 8px 0 0; color: var(--muted); font-size: .76rem; }
.search-result-money { display: block; margin-top: 2px; color: #5f6b65; font-size: .78rem; }
.search-result-money b { color: #2f6f58; }

/* Event search results open in place with the booth's products. */
.event-search-summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.event-search-item { padding: 0; overflow: hidden; }
.event-search-item > summary { list-style: none; cursor: pointer; }
.event-search-item > summary::-webkit-details-marker { display: none; }
.event-search-item .event-search-chevron { transform: rotate(90deg); transition: transform .15s ease; }
.event-search-item[open] .event-search-chevron { transform: rotate(-90deg); }
.event-search-detail { padding: 0 15px 13px; border-top: 1px solid var(--line); }
.search-products { list-style: none; margin: 0; padding: 0; }
.search-product { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 0 9px 12px; border-bottom: 1px dashed var(--line); }
.search-product::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 2px; background: var(--bar, transparent); }
.search-product.is-handled::before { background: transparent; }
.search-product img, .search-product-noimg { flex: none; width: 40px; height: 40px; border-radius: 7px; object-fit: cover; background: var(--soft); }
.search-product-noimg { border: 1px dashed var(--line); background: transparent; }
.search-product-main { flex: 1; min-width: 0; }
.search-product-main strong { display: block; overflow-wrap: anywhere; font-size: .92rem; }
.search-product-main .tags { margin-top: 3px; }
.search-product-side { flex: none; text-align: right; }
.search-product-side b, .search-product-side small { display: block; }
.search-product-side small { color: var(--muted); font-size: .78rem; }
.search-product.is-handled strong, .search-product.is-handled b { color: #59625e; }
.search-product.is-handled .tag { background: #e0e3e1; color: #6a736f; }
.search-product.is-handled .tag.state-tag { background: #5f6864; color: #fff; }
.search-product.is-handled img { filter: grayscale(1); opacity: .75; }
.search-product.priority-must { --bar: #e07a6a; }
.search-product.priority-want { --bar: #6fae93; }
.search-product.priority-casual { --bar: #8ea6c8; }
.event-search-detail > .button { margin-top: 10px; }

/* Cutting a product picture out of the booth's promos. */
.promo-crop-entry { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 8px; padding: 9px 12px; border: 1px solid #c6ddd0; border-radius: 13px; background: var(--paper); color: #2f6f58; text-align: left; }
.promo-crop-entry:hover { background: #f3faf5; }
.promo-crop-thumbs { display: flex; flex: none; }
.promo-crop-thumbs img { width: 32px; height: 44px; margin-left: -12px; border: 2px solid #fff; border-radius: 5px; object-fit: cover; object-position: top; box-shadow: 0 1px 4px #0003; }
.promo-crop-thumbs img:first-child { margin-left: 0; }
.promo-crop-copy strong { display: block; font-size: 1rem; }
.promo-crop-copy small { display: block; color: var(--muted); font-size: .76rem; font-weight: 600; }
.promo-pick { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; background: #091b24b0; }
.promo-pick-sheet { width: 100%; max-height: 80vh; overflow: auto; padding: 16px 16px 22px; border-radius: 20px 20px 0 0; background: var(--paper); }
.promo-pick-sheet h3 { margin: 0 0 12px; font-size: 1.05rem; }
.promo-pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.promo-pick-grid button { position: relative; padding: 0; overflow: hidden; border: 2px solid var(--line); border-radius: 12px; background: var(--soft); }
.promo-pick-grid img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.promo-pick-grid span { position: absolute; left: 6px; top: 6px; padding: 1px 7px; border-radius: 8px; background: #27312ecc; color: #fff; font-size: .72rem; font-weight: 700; }
.promo-pick-cancel { width: 100%; min-height: 44px; margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-weight: 700; }

/* 金额记录 scoped to the current filters. */
.stats-scope-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stats-scope-chip { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--sage-soft); color: #2f6f58; font-size: .78rem; font-weight: 800; vertical-align: 3px; }
.stats-scope-note { margin: 8px 2px 0; color: var(--muted); font-size: .8rem; }
.other-fold summary { color: #5f6b65; }

/* Map colours follow priority: red 必买, green 想买, blue 顺路, grey done.
   Grouped dots are split in proportion to the booths inside. */
.map-marker.pr-must::before { background: #e07a6a; }
.map-marker.pr-want::before { background: #6fae93; }
.map-marker.pr-casual::before { background: #8ea6c8; }
.map-marker.pr-none::before { background: var(--sage); }
.map-marker.pr-done::before { background: #b9c1bc; box-shadow: 0 1px 3px #29433725; }
.map-marker.pr-must .map-route-no, .map-jump.pr-must .map-jump-no { background: #e07a6a; }
.map-marker.pr-want .map-route-no, .map-jump.pr-want .map-jump-no { background: #6fae93; }
.map-marker.pr-casual .map-route-no, .map-jump.pr-casual .map-jump-no { background: #8ea6c8; }
.map-marker.pr-done .map-route-no, .map-jump.pr-done .map-jump-no { background: #b9c1bc; }
.markers-expanded .map-marker.pr-must .map-marker-label { border-color: #e9b1a8; }
.markers-expanded .map-marker.pr-casual .map-marker-label { border-color: #c3d0e2; }
.map-cluster { background: var(--mix, var(--sage)); border-width: 3px; text-shadow: 0 1px 2px #0006; }
.map-range::before { background: var(--mix, var(--sage)); }
.map-jump.pr-done { opacity: .6; }
.map-done-toggle { position: absolute; top: 74px; right: 10px; z-index: 9; display: flex; align-items: center; gap: 7px; padding: 6px 11px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: 0 4px 14px #0002; color: #4e6255; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.map-done-toggle[hidden] { display: none; }
.map-done-switch { position: relative; width: 30px; height: 18px; border-radius: 9px; background: #cfd8d3; transition: background .15s; }
.map-done-switch::after { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; }
.map-done-toggle[aria-pressed="true"] .map-done-switch { background: var(--sage); }
.map-done-toggle[aria-pressed="true"] .map-done-switch::after { left: 14px; }
.map-mark-target { position: absolute; top: 10px; left: 50%; z-index: 9; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; max-width: calc(100% - 20px); padding: 7px 14px 7px 11px; border-radius: 999px; background: var(--paper); box-shadow: 0 6px 18px #0003; color: var(--ink); font-size: .9rem; font-weight: 700; white-space: nowrap; pointer-events: none; }
.map-mark-target b { color: #a5463a; font-size: 1.15rem; }
.map-mark-target small { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #5f6b65; }
.map-mark-target i { flex: none; padding: 1px 7px; border-radius: 8px; font-style: normal; font-size: .75rem; font-weight: 800; }
.map-mark-target i.pr-must { background: #f8d6cf; color: #a5463a; }
.map-mark-target i.pr-want { background: #d3eadf; color: #2f6f58; }
.map-mark-target i.pr-casual { background: #d9e3f1; color: #47618a; }

/* Moving or copying a booth to another hall. */
.hall-move-note { margin: 6px 0 0; padding: 8px 10px; border-radius: 10px; background: #fbf1e5; color: #8b6239; font-size: .8rem; line-height: 1.45; }
.hall-move-note[hidden] { display: none; }
.copy-booth-sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; background: #091b24b0; }
.copy-booth-panel { width: 100%; max-height: 85vh; overflow: auto; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; background: var(--paper); }
.copy-booth-panel h3 { margin: 0 0 4px; font-size: 1.05rem; overflow-wrap: anywhere; }
.copy-booth-panel p { margin: 0 0 12px; color: var(--muted); font-size: .82rem; }
.copy-booth-halls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.copy-booth-halls button { min-height: 46px; padding: 6px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: #2f6f58; font-weight: 800; overflow-wrap: anywhere; }
.copy-booth-halls button:disabled { opacity: .45; color: var(--muted); }
.copy-booth-panel ul { margin: 12px 0; padding: 0; list-style: none; color: #4e6255; font-size: .85rem; line-height: 1.7; }
.copy-booth-panel > .button { width: 100%; }

/* Event 金额记录: budget card with a thin bar. */
.budget-stat { position: relative; padding-bottom: 28px; border: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.budget-track { position: absolute; left: 16px; right: 16px; bottom: 13px; display: flex; height: 6px; overflow: hidden; border-radius: 3px; background: #ffffffc0; }
.budget-track i { background: var(--sage); }
.budget-track em { background: #9fcab5; }
.budget-stat.is-over { background: #fbe3df; }
.budget-stat.is-over .stat-value { color: #a5463a; }
.budget-stat.is-over .budget-track i { background: #e07a6a; }
.budget-detail { grid-column: 1 / -1; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--paper); color: #4e6255; font-size: .84rem; line-height: 1.6; box-shadow: var(--shadow); }
.budget-detail .is-over { color: #a5463a; }

/* Filter order sheet. */
.filter-order-sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; background: #091b24b0; }
.filter-order-panel { width: 100%; max-height: 88vh; overflow: auto; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; background: var(--paper); }
.filter-order-panel h3 { margin: 0 0 2px; font-size: 1.05rem; }
.filter-order-panel p { margin: 0 0 10px; color: var(--muted); font-size: .8rem; }
.filter-order-panel ul { margin: 0; padding: 0; list-style: none; touch-action: none; }
.filter-order-panel li { display: flex; align-items: center; gap: 10px; padding: 6px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 700; background: var(--paper); }
.filter-order-panel li.is-hidden { color: #b0b8b3; }
.filter-order-panel li.is-dragging { position: relative; z-index: 1; border-radius: 10px; background: var(--sage-soft); box-shadow: 0 6px 16px #0002; }
.filter-order-grip { display: grid; place-items: center; width: 36px; height: 36px; color: #9aa8a1; font-size: 1.15rem; cursor: grab; touch-action: none; }
.filter-order-panel li button { margin-left: auto; padding: 3px 11px; border: 1px solid #c6ddd0; border-radius: 999px; background: none; color: var(--sage); font-size: .8rem; font-weight: 700; }
.filter-order-panel li.is-hidden button { border-color: var(--line); color: #9aa8a1; }
.filter-order-actions { display: flex; gap: 8px; margin-top: 12px; }
.filter-order-actions .button { flex: 1; min-height: 44px; }

/* 场贩 page: today first with progress, upcoming with countdown, past folded. */
.route-event-head { margin: 4px 0 10px; }
.route-event-head h2 { margin: 4px 0 2px; font-size: 1.2rem; }
.route-active .route-event-head h2 { font-size: 1.4rem; }
.route-event-head p { margin: 0; color: var(--muted); font-size: .85rem; }
.route-today { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--sage); color: #fff; font-size: .75rem; font-weight: 800; }
.route-section-label { margin: 22px 0 6px; color: #5f6b65; font-size: .95rem; }
.route-hall { display: block; width: 100%; text-align: left; }
.route-hall .route-hall-top .route-hall-go { font-size: 1rem; }
.route-hall-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.route-hall-top strong { font-size: 1.05rem; }
.route-hall-go { flex: none; color: var(--sage); font-weight: 800; }
.route-hall small { display: block; margin-top: 4px; color: #5f6b65; }
.route-progress { display: block; height: 8px; margin: 10px 0 2px; overflow: hidden; border-radius: 4px; background: #e8eee9; }
.route-progress i { display: block; height: 100%; background: var(--sage); }
.route-next { display: block; margin-top: 4px; color: #a5463a; font-size: .82rem; font-weight: 700; }
.route-past { margin-top: 18px; }
.route-past > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: #eef1ee; color: #7a8982; font-weight: 700; list-style: none; cursor: pointer; }
.route-past > summary::-webkit-details-marker { display: none; }
.route-past[open] > summary { margin-bottom: 10px; }

/* Map controls sit in a bar under the map, within reach of the thumb holding
   the phone: close, zoom and 下一摊. The title and PDF pages stay on top. */
.map-thumb-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--paper); border-top: 1px solid var(--line); }
.map-thumb-bar:last-child { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
.map-thumb-bar .button { min-width: 46px; min-height: 46px; padding: 0 12px; border: 0; background: var(--soft); color: var(--ink); }
.map-thumb-bar [data-map-close] { font-size: .9rem; }
.map-zoom { display: flex; align-items: center; gap: 4px; }
.map-zoom .button { font-size: 1.3rem; }
.map-zoom [data-map-zoom-label] { min-width: 46px; text-align: center; font-size: .8rem; color: var(--muted); }
.map-thumb-bar .map-next-booth { position: static; margin-left: auto; min-height: 48px; padding: 6px 18px; box-shadow: none; }
.map-pages { display: inline-flex; align-items: center; gap: 5px; }
.map-pages[hidden] { display: none; }
.map-stage-wrap .map-marker-info { bottom: 10px; }
.map-done-toggle { top: 10px; }
.map-touch-hint { animation: map-hint-out .4s ease 5s forwards; }
@keyframes map-hint-out { to { opacity: 0; visibility: hidden; } }

/* 全部买齐 sits first among the status buttons when several copies remain. */
.mini-action.buy-all { border-color: #a8cdb8; background: #eef7f1; color: var(--sage); }
.buy-all-short { display: none; }
.product-grid .buy-all-full, .product-list-mode .buy-all-full { display: none; }
.product-grid .buy-all-short, .product-list-mode .buy-all-short { display: inline; }
.stepper button { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* Quick taps on buttons must not double-tap-zoom the page. Zero specificity,
   so the map, image viewer and crop editor keep their own touch-action. */
:where(html, body, body *) { touch-action: manipulation; }
@media (max-width: 700px) { .map-toolbar .page-actions { width: auto; margin-left: auto; } }

/* Map thumbnails: the booth card shows the first promo and pictures of the
   products still to buy (badge = copies left); the booth strip a small promo. */
.map-marker-info.has-promo { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 12px; }
.map-marker-info.has-promo > :not(.map-info-promo):not(.map-info-close) { grid-column: 2; }
.map-marker-info.has-promo > .map-info-products { grid-column: 1 / -1; }
.map-marker-info.has-promo > [data-map-open-booth] { justify-self: start; }
.map-info-promo { grid-row: 1 / span 2; position: relative; width: 64px; height: 84px; padding: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--soft); }
.map-info-promo img, .map-info-product img { display: block; width: 100%; height: 100%; object-fit: cover; }
.map-info-promo span { position: absolute; right: 3px; bottom: 3px; padding: 0 5px; border-radius: 7px; background: #000a; color: #fff; font-size: .68rem; }
.map-info-products { display: flex; gap: 6px; margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.map-info-products::-webkit-scrollbar { display: none; }
.map-info-product { position: relative; flex: none; width: 52px; height: 52px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--soft); }
.map-info-product span { position: absolute; right: 2px; bottom: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--sage); color: #fff; font-size: .68rem; font-weight: 800; line-height: 17px; text-align: center; }
.map-info-product.is-done img { opacity: .4; filter: grayscale(1); }
.map-info-product.is-done span { background: #b4c0b6; }
.map-info-more { align-self: center; padding: 0 4px; color: var(--muted); font-size: .78rem; }
.map-jump-thumb { flex: none; width: 30px; height: 36px; border-radius: 5px; object-fit: cover; }

/* Back to the map from a booth opened there, in the thumb's corner above the
   tab bar; it turns solid once everything at the booth is handled. */
.map-return { position: fixed; right: 14px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 25; min-height: 48px; padding: 0 18px; border: 1px solid #a8cdb8; border-radius: 24px; background: var(--paper); color: var(--sage); font-weight: 800; box-shadow: 0 6px 18px #27312e33; }
.map-return.is-done { background: var(--sage); border-color: var(--sage); color: #fff; }
@media (min-width: 701px) { .map-return { bottom: 24px; } }
body:has(.toast.show) .map-return { bottom: calc(132px + env(safe-area-inset-bottom)); }

/* Run mode: the map fills the screen; a sheet at the bottom holds the booth
   being visited, a few pills float on top. */
.map-shell.is-run { position: relative; }
.is-run .map-stage-wrap { flex: 1 1 0; }
.run-top { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; z-index: 9; display: flex; gap: 6px; align-items: flex-start; pointer-events: none; }
.run-pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 13px; border: 0; border-radius: 999px; background: #fffffff2; color: var(--ink); font-size: .84rem; font-weight: 750; box-shadow: 0 3px 12px #0002; }
.run-pill b { color: var(--sage); }
.run-pill .map-pages button { border: 0; background: var(--soft); border-radius: 8px; width: 26px; height: 26px; color: var(--ink); }
.run-pill .map-pages span { font-size: .75rem; color: var(--muted); }
.run-list-button { margin-left: auto; background: var(--sage); color: #fff; }
.run-mode-button { color: var(--muted); font-weight: 650; }
.is-run .map-touch-hint { top: calc(56px + env(safe-area-inset-top)); bottom: auto; right: auto; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.run-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 12; }
.run-sheet-body { max-height: min(58dvh, 520px); display: flex; flex-direction: column; background: var(--paper); border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px #0002; padding: 0 14px calc(12px + env(safe-area-inset-bottom)); }
.run-zoom { position: absolute; right: 10px; bottom: calc(100% + 10px); display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 14px; background: #fffffff2; box-shadow: 0 3px 12px #0002; }
.run-zoom .button { min-width: 42px; min-height: 42px; padding: 0; border: 0; background: transparent; font-size: 1.25rem; color: var(--ink); }
.run-zoom [data-map-zoom-label] { min-width: 40px; text-align: center; font-size: .72rem; color: var(--muted); }
.run-grab { display: block; flex: none; width: 100%; height: 22px; margin: 0; padding: 0; border: 0; background: none; position: relative; }
.run-grab::after { content: ''; position: absolute; left: 50%; top: 8px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: #d5dbd6; }
.run-head, .run-mini { flex: none; display: flex; align-items: center; gap: 11px; }
.run-promo { position: relative; flex: none; width: 50px; height: 66px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--soft); }
.run-promo.is-small { width: 38px; height: 48px; }
.run-promo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.run-promo span { position: absolute; right: 2px; bottom: 2px; padding: 0 4px; border-radius: 6px; background: #000a; color: #fff; font-size: .62rem; }
.run-id { min-width: 0; flex: 1; }
.run-id strong { display: block; font-size: 1.55rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-id span { display: block; color: var(--muted); font-size: .84rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-mini .run-id strong { font-size: 1.2rem; }
.run-done { font-style: normal; color: var(--sage); font-weight: 800; }
.run-step { flex: none; display: grid; justify-items: end; gap: 1px; font-size: .7rem; color: var(--muted); }
.run-step b { font-size: .95rem; color: var(--ink); }
.run-step .subtle-link { font-size: .78rem; margin-top: 3px; }
.run-products { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 8px -14px 0; padding: 0 14px; border-top: 1px solid var(--line); }
.run-products .product-list { padding: 0; }
.run-empty { margin: 14px 0; color: var(--muted); font-size: .88rem; }
.run-nav { flex: none; display: grid; grid-template-columns: 64px 1fr 1.5fr; gap: 8px; padding-top: 10px; }
.run-nav .button, .run-mini .run-next { min-height: 52px; border-radius: 14px; padding: 4px 10px; }
.run-nav .button:not(.primary) { border: 0; background: var(--soft); }
/* Japanese labels (閉じる, 前へ) are wider than 关闭 / 上一摊. */
:lang(ja) .run-nav { grid-template-columns: auto 1fr 1.5fr; }
:lang(ja) .run-nav .button { white-space: nowrap; }
.run-next { display: grid; align-content: center; justify-items: center; gap: 0; background: var(--sage); border-color: var(--sage); line-height: 1.15; }
.run-next small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ffffffd9; font-size: .66rem; font-weight: 650; }
.run-next.is-ready { box-shadow: 0 0 0 4px #4a8d8040; }
.run-mini .run-next { flex: none; max-width: 46%; }
.run-sheet .map-booth-jump { margin: 10px -14px 0; padding-bottom: 2px; border-top: 1px solid var(--line); }
/* The booth being visited: a big coral label with its pin. */
.map-marker.run-target { z-index: 8; }
.map-marker.run-target::before { width: 14px; height: 14px; background: #e0634f; border-width: 3px; box-shadow: 0 0 0 6px #e0634f40; }
.map-marker.run-target .map-marker-label { display: flex; left: 50%; top: auto; bottom: calc(50% + 14px); transform: translateX(-50%); max-width: 70vw; padding: 5px 11px; border: 0; border-radius: 11px; background: #e0634f; color: #fff; font-size: .9rem; box-shadow: 0 4px 14px #e0634f66; }
.map-marker.run-target .map-marker-label .map-route-no { background: #fff; color: #e0634f; }
.map-marker.run-target .map-marker-label .map-marker-count { color: #fff; }
.map-marker.run-target .map-marker-name { max-width: 60vw; }
.markers-expanded .map-point.run-target::after { display: none; }
/* Full booth list. */
.run-list { position: absolute; inset: 0; z-index: 20; }
.run-list[hidden] { display: none; }
.run-list-shade { position: absolute; inset: 0; border: 0; padding: 0; background: #27382f66; }
.run-list-panel { position: absolute; left: 0; right: 0; bottom: 0; top: calc(70px + env(safe-area-inset-top)); display: flex; flex-direction: column; background: var(--paper); border-radius: 20px 20px 0 0; padding: 0 14px env(safe-area-inset-bottom); }
.run-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 8px; }
.run-list-head small { color: var(--muted); font-size: .76rem; }
.run-list-panel .map-done-toggle { position: static; align-self: flex-start; margin: 0 0 8px; box-shadow: none; background: var(--soft); }
.run-list-rows { flex: 1; overflow-y: auto; overscroll-behavior: contain; margin: 0 -14px; padding: 0 14px 14px; }
.run-list-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 60px; padding: 7px 6px; border: 0; border-bottom: 1px solid #eef1ee; background: none; color: var(--ink); text-align: left; }
.run-list-row img, .run-list-noimg { flex: none; width: 34px; height: 44px; border-radius: 6px; object-fit: cover; background: var(--soft); }
.run-list-row i { flex: none; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--sage); color: #fff; font-style: normal; font-size: .7rem; font-weight: 800; }
.run-list-row.pr-must i { background: #d0675a; }
.run-list-main { min-width: 0; flex: 1; }
.run-list-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.run-list-main small { display: block; color: var(--muted); font-size: .74rem; }
.run-list-row em { color: var(--sage); font-style: normal; font-weight: 800; }
.run-list-row.is-current { background: #fff1ee; border-radius: 10px; }
.run-list-row.is-current i { background: #e0634f; }
.run-list-row.is-done { opacity: .5; }
.run-list-row.is-done i { background: #b4c0b6; }
.run-list-section { margin: 14px 0 2px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .05em; }
/* The toast shows above the run sheet while the map is open. */
.map-dialog .toast { top: calc(58px + env(safe-area-inset-top)); bottom: auto; z-index: 30; }
/* Settings: one row per map preference. */
.map-pref { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.map-pref strong { display: block; font-size: .92rem; }
.map-pref small { display: block; margin-top: 2px; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.map-pref .layout-switch { flex: none; margin: 0; }
@media (max-width: 520px) { .map-pref { flex-direction: column; align-items: stretch; } .map-pref .layout-switch { justify-content: flex-start; } }
/* Run sheet product rows stay one line of controls: the priority shows as the
   row's colour bar, so only state tags (稍后 / 售空 …) remain. */
.run-products .product-row { padding: 9px 0 9px 10px; }
.run-products .tags .tag:not(.state-tag):not(.later-tag) { display: none; }
.run-products .tags:not(:has(.state-tag, .later-tag)) { display: none; }
.run-products .product-controls { flex-wrap: nowrap; gap: 4px; margin-top: 6px; }
.run-products .stepper { flex: none; height: 38px; }
.run-products .stepper button { width: 34px; height: 38px; }
.run-products .stepper span { padding: 0 6px; font-size: .82rem; }
.run-products .product-status-actions { flex-wrap: nowrap; gap: 3px; min-width: 0; }
.run-products .mini-action { min-height: 38px; padding: 3px 6px; font-size: .74rem; white-space: nowrap; }
/* Folded sheet keeps a way out next to 下一摊. */
.run-mini .run-close { flex: none; min-width: 56px; min-height: 52px; padding: 0 10px; border: 0; border-radius: 14px; background: var(--soft); }
/* 跑摊 / 全局: what the run map shows, switched in place of the old 旧版. */
.run-scope { gap: 2px; padding: 3px; }
.run-scope button { min-height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 750; font-size: .82rem; }
.run-scope button[aria-pressed="true"] { background: var(--sage); color: #fff; }
.run-list-button { margin-left: auto; }
.run-top { flex-wrap: wrap; }
/* Run sheet: what is left to pay at this booth. */
.run-id .run-pay { color: var(--ink); font-size: .84rem; font-weight: 650; }
.run-id .run-pay b { color: #c0533f; font-size: 1rem; font-weight: 850; }
.run-id .run-pay:empty { display: none; }
/* Booths still to visit that are not placed on the map. */
.run-unplaced { position: absolute; top: calc(56px + env(safe-area-inset-top)); left: 10px; right: 10px; z-index: 9; min-height: 38px; padding: 7px 13px; border: 1px solid #f0d2a8; border-radius: 12px; background: #fff7eaf2; color: #8a5a1f; font-size: .8rem; font-weight: 650; text-align: left; box-shadow: 0 3px 12px #0001; }
.run-unplaced b { color: #b0661a; white-space: nowrap; }
.run-unplaced[hidden] { display: none; }
.is-run .run-unplaced:not([hidden]) ~ .map-touch-hint { top: calc(104px + env(safe-area-inset-top)); }

/* Favourite authors. */
.authors-entry { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 18px; padding: 14px 16px; text-align: left; color: var(--ink); }
.authors-entry-star { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff3dc; color: #d7962a; font-size: 1.3rem; flex: none; }
.authors-entry-main { flex: 1; min-width: 0; }
.authors-entry-main strong { display: block; font-size: 1rem; }
.authors-entry-main small { color: var(--muted); font-size: .8rem; }
.authors-entry-arrow { color: var(--sage); font-size: 1.4rem; }
.author-search { width: 100%; margin: 0 0 12px; }
.author-quick-entry { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin: 0 0 14px; padding: 12px 15px; border-color: #f0d9a8; background: #fffaf0; color: var(--ink); text-align: left; }
.author-quick-entry strong { display: block; font-size: .92rem; }
.author-quick-entry small { color: #9a6b22; font-size: .78rem; }
.author-quick-entry > span[aria-hidden] { color: #c58a2a; font-size: 1.3rem; }
.author-list { overflow: hidden; }
.author-row { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-top: 1px solid var(--line); cursor: pointer; }
.author-row:first-child { border-top: 0; }
.author-row:hover { background: #fbfdfb; }
.author-avatar { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 1.05rem; }
.author-row-main { flex: 1; min-width: 0; }
.author-row-name strong { font-size: .98rem; }
.author-row-name small { margin-left: 5px; color: var(--muted); font-size: .74rem; }
.author-row-stats { display: block; margin-top: 2px; color: #6c7b74; font-size: .76rem; }
.author-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.author-pill { padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .7rem; font-weight: 750; }
.author-pill.is-here { background: var(--sage-soft); color: var(--sage); }
.author-pill.is-missed { background: #fde8e3; color: #b0503e; }
.author-star { flex: none; width: 42px; height: 42px; border: 0; border-radius: 12px; background: none; color: #c8d0cb; font-size: 1.45rem; }
.author-star.is-on { color: #e0a43a; }
.author-star.is-big { width: 48px; height: 48px; font-size: 1.8rem; }
.author-empty { margin: 4px 2px 12px; color: var(--muted); font-size: .86rem; }
.author-hero { padding: 16px; }
.author-hero-top { display: flex; align-items: center; gap: 13px; }
.author-hero .author-avatar { width: 58px; height: 58px; font-size: 1.4rem; }
.author-hero-name { flex: 1; min-width: 0; }
.author-hero-name h1 { margin: 0; font-size: 1.45rem; }
.author-hero-name p { margin: 3px 0 0; color: var(--muted); font-size: .8rem; }
.author-links { padding: 12px 0 0; }
.author-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 13px; }
.author-stats div { padding: 9px 4px; border-radius: 11px; background: var(--soft); color: var(--muted); font-size: .72rem; text-align: center; }
.author-stats b { display: block; color: var(--ink); font-size: 1.05rem; }
.author-note { margin: 12px 0 0; padding: 8px 10px; border: 1px solid #f3e6b4; border-radius: 10px; background: #fffbea; color: #55635c; font-size: .86rem; white-space: pre-wrap; }
.author-actions { margin-top: 12px; }
.author-timeline { display: grid; gap: 8px; position: relative; padding-left: 16px; }
.author-timeline::before { content: ''; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 2px; background: #d6e2da; }
.author-entry { position: relative; display: grid; gap: 4px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); color: var(--ink); text-align: left; }
.author-entry::before { content: ''; position: absolute; left: -16px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--sage); }
.author-entry.is-plan { border: 1.5px dashed #a8cdb8; background: #f3faf5; }
.author-entry.is-plan::before { background: var(--paper); border: 2px solid var(--sage); width: 6px; height: 6px; }
.author-entry-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.author-entry-head strong { font-size: .9rem; }
.author-entry-head small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.author-entry-items { color: #55635c; font-size: .8rem; line-height: 1.6; }
.author-missed { display: block; color: #b0503e; }
/* Booth page and cards. */
.booth-fav { flex: none; align-self: flex-start; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: .8rem; font-weight: 800; }
.booth-fav.is-on { border-color: #f0d9a8; background: #fff8e8; color: #b07a1a; }
.booth-fav-memo { margin: 0 17px 4px; padding: 8px 10px; border-radius: 10px; background: #fffbea; border: 1px solid #f3e6b4; color: #55635c; font-size: .82rem; line-height: 1.6; }
.booth-fav-memo b { color: #b0503e; }
.fav-mark { margin-right: 4px; color: #e0a43a; }
/* Map: favourites in gold. */
.markers-expanded .map-marker.is-fav:not(.run-target) .map-marker-label { border-color: #e7c27a; background: #fff8e8f2; color: #8a5a1f; }
.map-marker.is-fav:not(.run-target)::before { background: #e0a43a; }
.run-fav { margin-right: 4px; color: #e0a43a; }
.run-id .run-note { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 2px; padding: 0; border: 0; background: none; color: #8a6a2a; font: inherit; font-size: .78rem; line-height: 1.4; text-align: left; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
.run-id .run-note.is-open { display: block; -webkit-line-clamp: unset; }
/* Quick add sheet. */
.quick-add-sheet { position: fixed; inset: 0; z-index: 40; background: #27382f66; display: flex; align-items: flex-end; justify-content: center; }
.quick-add-panel { width: min(100%, 520px); max-height: 88dvh; display: flex; flex-direction: column; border-radius: 20px 20px 0 0; background: var(--paper); padding: 8px 16px calc(14px + env(safe-area-inset-bottom)); }
.quick-add-grab { width: 40px; height: 5px; margin: 0 auto 10px; border-radius: 3px; background: #d5dbd6; }
.quick-add-panel h3 { margin: 0; font-size: 1.05rem; }
.quick-add-panel > p { margin: 3px 0 0; color: var(--muted); font-size: .8rem; }
.quick-add-hall { margin: 10px 0 4px; color: var(--muted); font-size: .82rem; display: flex; align-items: center; gap: 8px; }
.quick-add-hall select { min-height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: var(--paper); }
.quick-add-rows { flex: 1; min-height: 0; overflow-y: auto; margin: 6px -16px 0; padding: 0 16px; }
.quick-add-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: center; gap: 4px 10px; padding: 10px 0; border-top: 1px solid #eef1ee; }
/* スペース番号 is wider than 摊位号. */
:lang(ja) .quick-add-row { grid-template-columns: minmax(0, 1fr) 124px; }
.quick-add-pick { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.quick-add-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.quick-add-box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid #c8d0cb; border-radius: 7px; color: #fff; font-size: .8rem; font-weight: 900; }
.quick-add-pick input:checked + .quick-add-box, .quick-add-box.is-on { background: var(--sage); border-color: var(--sage); }
.quick-add-pick input:checked + .quick-add-box::after { content: '✓'; }
.quick-add-pick input:focus-visible + .quick-add-box { outline: 2px solid #90bac7; outline-offset: 2px; }
.quick-add-main { min-width: 0; }
.quick-add-main b { display: block; font-size: .95rem; }
.quick-add-main small { display: block; color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-add-number { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; font-weight: 750; }
.quick-add-missed { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; padding-left: 34px; color: #55635c; font-size: .8rem; }
.quick-add-row.is-added { display: flex; gap: 10px; opacity: .55; }
.quick-add-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; padding-top: 12px; }
.quick-add-actions .button { min-height: 48px; }
.run-id .run-fav { display: inline; }

/* 代行: chips on booths and products, form fields, picker, list page. */
.proxy-chip, .proxy-tag { display: inline-flex; align-items: center; border: 0; border-radius: 999px; background: #ece6f6; color: #5b4a8a; font-weight: 800; white-space: nowrap; }
.proxy-chip { margin: 6px 0 0; padding: 3px 10px; font-size: .8rem; }
.proxy-tag { margin-left: 6px; padding: 1px 8px; font-size: .74rem; vertical-align: 2px; }
.proxy-tag.is-self { background: #e6ebe7; color: #5f6b65; }
.booth-circle-name.is-proxy-name { color: #5b4a8a; }
.proxy-entry { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 14px 16px; border: 1px solid #ddd3f0; border-radius: 16px; background: #f4f0fb; color: #4b3b80; text-align: left; }
.proxy-entry b { display: block; font-size: 1rem; }
.proxy-entry small { display: block; margin-top: 2px; color: #6b5ca0; font-size: .8rem; }
.proxy-entry > span:last-child { margin-left: auto; font-size: 1.2rem; font-weight: 800; }
.proxy-entry-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: #7a64b8; color: #fff; font-weight: 900; }
.proxy-line { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 8px; padding: 9px 12px; border: 0; border-radius: 12px; background: #f4f0fb; color: #4b3b80; font-size: .84rem; font-weight: 700; }
.proxy-pick { min-height: 44px; padding: 8px 12px; border: 1px solid #ddd3f0; border-radius: 11px; background: #f9f7fd; color: #4b3b80; font-weight: 800; text-align: left; }
.proxy-hint { color: var(--muted); font-size: .78rem; }
.proxy-choices { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr; gap: 8px; }
.proxy-choices.is-two { grid-template-columns: 1fr 1fr; }
.proxy-choice { min-height: 46px; padding: 4px 6px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: #5f6b65; font-weight: 800; font-size: .88rem; line-height: 1.25; overflow-wrap: anywhere; }
.proxy-choice small { display: block; color: var(--muted); font-size: .72rem; font-weight: 600; }
.proxy-choice.is-on { border-color: #7a64b8; background: #ece6f6; color: #4b3b80; }
.proxy-choice.is-on small { color: #6b5ca0; }
.proxy-picker { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; background: #091b24b0; }
dialog.proxy-picker { position: fixed; inset: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; }
dialog.proxy-picker:not([open]) { display: none; }
dialog.proxy-picker::backdrop { background: #091b24b0; }
dialog.proxy-picker .proxy-picker-panel:focus { outline: none; }
.proxy-picker-panel { width: 100%; max-height: 85vh; overflow: auto; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; background: var(--paper); }
.proxy-picker-panel h3 { margin: 4px 0 2px; font-size: 1.05rem; overflow-wrap: anywhere; }
.proxy-picker-panel > p { margin: 0 0 8px; color: var(--muted); font-size: .82rem; }
.proxy-person { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 48px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font-weight: 700; font-size: 1rem; text-align: left; }
.proxy-person small { color: #9aa8a1; font-weight: 600; }
.proxy-person.is-none { color: #5f6b65; }
.proxy-new { display: flex; gap: 8px; margin-top: 10px; }
.proxy-new input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px dashed #c6ddd0; border-radius: 12px; font-size: 1rem; }
.proxy-picker-cancel { width: 100%; margin-top: 10px; }
.proxy-rename-actions { display: flex; gap: 8px; margin-top: 12px; }
.proxy-rename-actions .button { flex: 1; min-height: 44px; }
.proxy-convert-list { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); list-style: none; color: #4e6255; font-size: .84rem; line-height: 1.8; }
.proxy-total { display: flex; justify-content: space-between; margin-bottom: 12px; padding: 12px 16px; border-radius: 14px; background: #eef6f1; color: #2f6f58; font-weight: 800; }
.proxy-card { margin-bottom: 10px; padding: 14px 16px; }
.proxy-card.is-focus { outline: 3px solid #7a64b8; outline-offset: 2px; }
.proxy-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.proxy-card-top b { font-size: 1.1rem; overflow-wrap: anywhere; }
.proxy-card-top span { flex: none; color: #a5463a; font-weight: 800; }
.proxy-card.is-paid .proxy-card-top span { color: #2f6f58; }
.proxy-card ul { margin: 8px 0 0; padding: 0; list-style: none; color: #4e6255; font-size: .84rem; line-height: 1.8; }
.proxy-card li { display: flex; justify-content: space-between; gap: 10px; }
.proxy-card li b { flex: none; font-weight: 700; }
.proxy-card li b.is-muted { color: var(--muted); }
.proxy-card-actions { display: flex; gap: 8px; margin-top: 10px; }
.author-proxy-convert { border-color: #ddd3f0; background: #f4f0fb; color: #5b4a8a; }
/* 买过的 整理 mode: checkbox rows and a bar to set the picked names as 代行. */
.author-tidy-toggle { margin-left: auto; padding: 4px 12px; border: 1px solid #ddd3f0; border-radius: 999px; background: #f4f0fb; color: #5b4a8a; font-size: .8rem; font-weight: 800; }
.author-row.is-tidy { cursor: pointer; }
.tidy-box { flex: none; align-self: center; width: 24px; height: 24px; margin-right: 2px; border: 2px solid #cfd8d3; border-radius: 7px; }
.author-row.is-tidy input:checked + .tidy-box { position: relative; border-color: #7a64b8; background: #7a64b8; }
.author-row.is-tidy input:checked + .tidy-box::after { content: '✓'; position: absolute; inset: 0; color: #fff; font-weight: 900; line-height: 20px; text-align: center; }
.author-row.is-tidy input:focus-visible + .tidy-box { outline: 2px solid var(--sage); outline-offset: 2px; }
.author-tidy-bar { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 20; display: flex; gap: 8px; margin-top: 12px; padding: 10px; border-radius: 16px; background: var(--paper); box-shadow: 0 10px 30px #0003; }
.author-tidy-bar .button { flex: 1; min-height: 44px; }
.author-tidy-bar .author-tidy-apply { flex: 2; border: 0; background: #7a64b8; color: #fff; }
.author-tidy-bar .author-tidy-apply:disabled { background: #c9bfe2; }
.author-proxy-share { margin: 10px 2px 0; color: #5b4a8a; font-size: .84rem; font-weight: 700; }

/* 代行清单: totals, 未收 / 已收 / 全部, one line per person opened to items
   with pictures; an item opens a sheet with the big picture. */
.proxy-total-card { margin-bottom: 10px; padding: 14px 16px; }
.proxy-total-head { display: flex; justify-content: space-between; gap: 10px; font-size: 1rem; }
.proxy-total-head b:last-child { font-size: 1.15rem; }
.proxy-total-bar { height: 10px; margin: 10px 0 8px; border-radius: 99px; background: #c9b8ec; overflow: hidden; }
.proxy-total-bar i { display: block; height: 100%; background: #9fd2b9; }
.proxy-total-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 6px; color: var(--muted); font-size: .8rem; }
.proxy-total-legend b { color: var(--ink); }
.proxy-total-legend b.is-due { color: #a5463a; }
.proxy-total-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #9fd2b9; vertical-align: 1px; }
.proxy-total-proxy { color: #6b5ca0; }
.proxy-total-proxy i { background: #c9b8ec; }
.proxy-card.is-self { border-color: #cfe3d8; background: #f4faf6; }
.proxy-card.is-self .proxy-head-amount { color: var(--ink); }
.proxy-self-tag { margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: #e6ebe7; color: #5f6b65; font-size: .7rem; font-weight: 800; vertical-align: 2px; }
.proxy-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.proxy-sum div { padding: 10px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--muted); font-size: .76rem; text-align: center; }
.proxy-sum b { display: block; color: var(--ink); font-size: 1.15rem; }
.proxy-sum b.is-due { color: #a5463a; }
.proxy-filter { display: flex; gap: 6px; margin-bottom: 12px; }
.proxy-filter button { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: .84rem; font-weight: 800; }
.proxy-filter button.is-on { border-color: var(--sage); background: var(--sage); color: #fff; }
.proxy-card { padding: 0; overflow: hidden; }
.proxy-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 64px; padding: 12px 16px; border: 0; background: none; color: var(--ink); text-align: left; }
.proxy-head-main { flex: 1; min-width: 0; }
.proxy-head-main b { display: block; font-size: 1.05rem; overflow-wrap: anywhere; }
.proxy-head-main small { color: var(--muted); font-size: .76rem; }
.proxy-head-amount { flex: none; color: #a5463a; font-weight: 900; font-size: 1.05rem; }
.proxy-card.is-paid .proxy-head-amount { color: #2f6f58; }
.proxy-card.is-paid .proxy-head-main b { color: var(--muted); }
.proxy-chevron { flex: none; width: 9px; height: 9px; border-right: 2px solid #a8b4ad; border-bottom: 2px solid #a8b4ad; transform: rotate(-45deg); transition: transform .15s; }
.proxy-card.is-open .proxy-chevron { transform: rotate(45deg); }
.proxy-items { border-top: 1px dashed var(--line); padding: 4px 10px; }
.proxy-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 6px; border: 0; border-radius: 10px; background: none; color: var(--ink); text-align: left; }
.proxy-item:active { background: var(--soft); }
.proxy-thumb { flex: none; width: 44px; height: 44px; border-radius: 9px; overflow: hidden; background: var(--soft); }
.proxy-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.proxy-thumb-none { display: block; width: 100%; height: 100%; border: 1px dashed var(--line); border-radius: 9px; }
.proxy-item-main { flex: 1; min-width: 0; }
.proxy-item-main b { display: block; font-size: .9rem; font-weight: 750; }
.proxy-item-main small { display: block; color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proxy-item-amount { flex: none; font-weight: 800; font-size: .9rem; }
.proxy-item-go { flex: none; color: var(--sage); font-weight: 800; }
.proxy-item.is-pending .proxy-item-amount { color: var(--muted); }
.proxy-item.is-missed .proxy-item-amount, .proxy-item.is-missed .proxy-item-main b { color: #a5463a; }
.proxy-card .proxy-card-actions { margin: 0; padding: 4px 16px 14px; }
.proxy-item-image { position: relative; display: grid; place-items: center; width: 100%; height: 240px; margin: 0 0 12px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--soft); color: var(--muted); font-size: .86rem; }
.proxy-item-image img { width: 100%; height: 100%; object-fit: contain; }
.proxy-item-image span { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: #000a; color: #fff; font-size: .72rem; }
.proxy-item-facts { display: grid; grid-template-columns: 64px 1fr; gap: 8px 10px; margin: 0 0 14px; font-size: .9rem; }
.proxy-item-facts dt { color: var(--muted); }
.proxy-item-facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.proxy-item-status { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--soft); font-size: .8rem; }
.proxy-item-status.is-done { background: var(--sage-soft); color: var(--sage); }
.proxy-item-status.is-missed { background: #fde8e3; color: #a5463a; }

/* Phones: edit sheets span the full screen width. Browsers cap <dialog> at
   100% - 2em by default, which left the sheet short of the right edge. */
@media (max-width: 700px) {
  .sheet-dialog { max-width: 100%; left: 0; right: 0; }
}

/* Without a map the section is one title row and one short line. */
.hall-map-section:has(.hall-map-placeholder) { margin-bottom: 14px; }
.hall-map-placeholder { margin: -4px 0 0; padding: 0; border: 0; background: none; text-align: left; font-size: .84rem; }

/* Product row: 售空 stays out; 稍后购入 and 放弃 sit behind ⋯ unless on. */
.mini-action.product-more { min-width: 42px; font-size: 1.05rem; font-weight: 900; letter-spacing: 1px; }
.product-menu { position: absolute; z-index: 60; min-width: 150px; padding: 6px; border-radius: 14px; background: var(--paper); box-shadow: 0 10px 30px #0003; }
.product-menu button { display: block; width: 100%; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 10px; background: none; color: var(--ink); font-weight: 700; text-align: left; }
.product-menu button + button { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.product-menu button.is-warn { color: #a5463a; }
.product-menu button:hover { background: var(--soft); }

/* Home: countdown and progress under each event. */
.event-progress { display: block; margin-top: 6px; color: #4e6255; font-size: .82rem; }
.event-progress b { color: #a5463a; }

/* Author page without avatars; 摊位信息 from the latest booth. */
.author-row { padding-left: 16px; }
.author-info { margin: 12px 0 0; padding: 14px 16px; }
.author-info h2 { margin: 0; font-size: 1rem; }
.author-info-source { margin: 2px 0 8px; color: var(--muted); font-size: .78rem; }
.author-info dl { margin: 0; }
.author-info-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.author-info-row dt { color: var(--muted); font-size: .84rem; }
.author-info-row dd { margin: 0; color: var(--ink); font-size: .92rem; overflow-wrap: anywhere; }
.author-info-link { display: block; padding: 2px 0; color: var(--sage); text-decoration: none; }
.author-info-link + .author-info-link { margin-top: 6px; }
.author-info-link b { display: block; font-size: .9rem; }
.author-info-link span { display: block; color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 没买到的商品 */
.miss-entry { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 14px 16px; border: 1px solid #f0d6cc; border-radius: 16px; background: #fdf3ef; color: #8a3f33; text-align: left; }
.miss-entry b { display: block; font-size: 1rem; }
.miss-entry small { display: block; margin-top: 2px; color: #a5675a; font-size: .8rem; }
.miss-entry > span:last-child { margin-left: auto; font-size: 1.2rem; font-weight: 800; }
.miss-entry-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: #e07a6a; color: #fff; font-weight: 900; }
.miss-filter { overflow-x: auto; scrollbar-width: none; }
.miss-filter button { flex: none; }
.miss-filter button:disabled { opacity: .45; }
.miss-group { margin: 16px 2px 8px; color: #5f6b65; font-size: .86rem; font-weight: 800; }
.miss-card { margin-bottom: 8px; padding: 12px 14px; }
.miss-card-main { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; }
.miss-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.miss-card-top b { min-width: 0; overflow-wrap: anywhere; font-size: 1rem; }
.miss-card-top > span { flex: none; font-weight: 800; }
.miss-card-top small { color: var(--muted); font-weight: 700; }
.miss-card-main > small { display: block; margin-top: 2px; color: var(--muted); font-size: .8rem; }
.miss-card-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.miss-reason, .miss-mail { padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.miss-reason.is-sold { background: #5f6864; color: #fff; }
.miss-reason.is-abandoned { background: #e0e3e1; color: #5f6b65; }
.miss-reason.is-left { background: #fbf1e5; color: #8b6239; }
.miss-mail.is-yes { background: #d3eadf; color: #2f6f58; }
.miss-mail.is-unknown { background: #fbf1e5; color: #8b6239; }
.miss-mail.is-no { background: #eef1ee; color: #8e9991; }
.miss-card-actions { display: flex; gap: 6px; margin-left: auto; }
.miss-card-actions .button.is-on { border-color: var(--sage-soft); background: var(--sage-soft); color: #2f6f58; }
.miss-card.is-rebought .miss-card-main, .miss-card.is-rebought .miss-reason, .miss-card.is-rebought .miss-mail { opacity: .5; }
.miss-card.is-rebought .miss-card-top b { text-decoration: line-through; }
.run-list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.run-list-tools .map-done-toggle { margin: 0; }
.run-list-exit { margin-left: auto; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: #4e6255; font-size: .8rem; font-weight: 700; }
.settings-subhead { margin: 22px 0 4px; font-size: 1rem; }
.import-mode-sheet .proxy-person > span:first-child small { display: block; margin-top: 3px; font-size: .8rem; }
.import-mode-sheet .proxy-person.is-danger > span:first-child { color: #c4554a; }

/* 分给多人: one product, several people. Chips under the name (green once
   that person has all theirs), the form button, and the two sheets. */
.split-line { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 0; padding: 3px; border: 0; border-radius: 10px; background: none; text-align: left; }
.split-chip { padding: 2px 8px; border-radius: 999px; background: #ece6f6; color: #5b4a8a; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.split-chip.is-self { background: #e6ebe7; color: #5f6b65; }
.split-chip.is-done { background: #dcefe3; color: #2f6f58; }
.proxy-split-button { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; width: 100%; margin-top: 8px; min-height: 46px; padding: 6px 12px; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--paper); color: #5f6b65; text-align: left; }
.proxy-split-button b { flex: 1; font-size: .88rem; }
.proxy-split-button small { order: 3; width: 100%; color: var(--muted); font-size: .74rem; overflow-wrap: anywhere; }
.proxy-split-button > span { color: var(--muted); }
.proxy-split-button.is-on { border-style: solid; border-color: #7a64b8; background: #ece6f6; color: #4b3b80; }
.proxy-split-button.is-on small { color: #6b5ca0; }
.split-rows { margin: 4px 0 8px; }
.split-row { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 6px 0; border-bottom: 1px solid var(--line); background: var(--paper); }
.split-row.is-dragging { position: relative; z-index: 2; box-shadow: 0 6px 18px #091b2430; }
.split-handle { flex: none; padding: 8px 4px; color: #9aa8a1; font-size: 1.2rem; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.split-who { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.split-who b { display: block; font-size: 1rem; }
.split-who small { color: var(--muted); font-size: .76rem; }
.split-row .stepper { flex: none; height: 40px; }
.split-row .stepper button { width: 40px; height: 40px; }
.split-row .stepper span { min-width: 34px; text-align: center; }
.split-add { width: 100%; min-height: 46px; border: 1.5px dashed #c6ddd0; border-radius: 12px; background: none; color: var(--sage); font-weight: 800; }
.split-total { display: flex; justify-content: space-between; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: #eef6f1; color: #2f6f58; font-weight: 800; }
.proxy-item-split { display: block; color: var(--muted); font-size: .78rem; }
/* Four 買い逃し chips fit one row at 375–390 in Japanese too. */
:lang(ja) .miss-filter { gap: 5px; }
:lang(ja) .miss-filter button { padding: 7px 10px; }
/* 作者追踪 (owner only). Category colours stay on the small tags. */
.tracker-entry { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: var(--ink); }
.tracker-entry-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--sage-soft); font-size: 1.2rem; flex: none; }
.tracker-entry-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tracker-entry-main small { color: var(--muted); font-size: .82rem; }
.tracker-entry-arrow { color: var(--muted); font-size: 1.4rem; }
.tracker-hot { color: #c4513f; }
.tracker-banner { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 14px; padding: 9px 13px; border: 1px solid #f3c3ba; border-radius: 12px; background: #fde9e5; color: #8f3a2e; font-size: .88rem; text-align: left; }
.tracker-banner-arrow { margin-left: auto; font-weight: 800; }
.tracker-dot { width: 8px; height: 8px; border-radius: 50%; background: #5fb08f; flex: none; }
.tracker-banner .tracker-dot { background: #e97668; }
.tracker-status { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 8px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--muted); font-size: .85rem; }
.tracker-status b { color: var(--ink); }
.tracker-status.is-warn { border-color: #f1d29a; background: #fff8ea; }
.tracker-status.is-warn .tracker-dot { background: #e0a23a; }
.tracker-tabs { display: flex; gap: 7px; margin: 12px 0 10px; overflow-x: auto; scrollbar-width: none; }
.tracker-tabs button { flex: none; min-height: 36px; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-weight: 800; font-size: .88rem; }
.tracker-tabs button.is-on { background: var(--sage); border-color: var(--sage); color: #fff; }
.tracker-tabs em { font-style: normal; margin-left: 5px; padding: 0 6px; border-radius: 999px; background: #e97668; color: #fff; font-size: .74rem; }
.tracker-msg { margin-top: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.tracker-msg.is-unread { box-shadow: inset 3px 0 0 #e97668; }
.tracker-msg.is-read { opacity: .6; }
.tracker-meta { display: flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--muted); min-width: 0; }
.tracker-meta b { color: var(--ink); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tracker-time { margin-left: auto; flex: none; }
.tracker-cat { flex: none; font-size: .74rem; font-weight: 900; border-radius: 7px; padding: 2px 7px; }
.tracker-cat.tone-start { background: #fde5e1; color: #c4513f; }
.tracker-cat.tone-pre { background: #fdf0d8; color: #a8701d; }
.tracker-cat.tone-event { background: #e2ecfa; color: #3d63a3; }
.tracker-cat.tone-re { background: #e1f0e9; color: #3d6f62; }
.tracker-cat.tone-sold, .tracker-cat.tone-plain { background: #eceff0; color: #6c7b74; }
.tracker-meta .tracker-cat { margin-left: 1px; }
.tracker-sum { font-weight: 800; font-size: .93rem; margin: 6px 0 3px; overflow-wrap: anywhere; }
.tracker-facts { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0; }
.tracker-facts span { font-size: .74rem; background: var(--soft); border-radius: 7px; padding: 1px 6px; color: #4c5a54; }
/* The clamp sits on the inner span so the padding never shows a cut line. */
.tracker-orig { font-size: .82rem; color: var(--muted); line-height: 1.5; background: var(--page); border-radius: 9px; padding: 5px 9px; margin-top: 4px; cursor: pointer; }
.tracker-orig > span { white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tracker-orig.is-main { color: var(--ink); background: none; padding: 5px 0 0; }
.tracker-orig.is-main > span { -webkit-line-clamp: 6; }
.tracker-orig.is-open > span { display: block; }
.tracker-acts { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.tracker-acts .button { min-height: 34px; padding-block: 4px; }
.tracker-link { background: var(--paper); }
.tracker-over { color: var(--muted); font-size: .8rem; font-weight: 700; }
.tracker-allread { margin: 12px 2px 0; color: var(--muted); font-size: .86rem; }
.tracker-readhead { display: flex; align-items: center; gap: 8px; margin: 16px 2px 2px; color: var(--muted); font-size: .8rem; font-weight: 800; }
.tracker-readhead::after { content: ""; flex: 1; border-top: 1px dashed var(--line); }
.tracker-readline { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 40px; margin-top: 5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--muted); font-size: .82rem; text-align: left; }
.tracker-readline b { flex: none; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: .84rem; }
.tracker-readsum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tracker-readline em { flex: none; font-style: normal; font-size: .72rem; }
.tracker-readline small { flex: none; font-size: .74rem; }
.tracker-readopen > .tracker-fold { display: block; margin-left: auto; }
.tracker-read { margin-left: auto; }
.tracker-empty { margin-top: 12px; }
.tracker-add { display: flex; gap: 7px; }
.tracker-add input { flex: 1; min-width: 0; min-height: 42px; border: 1px dashed #b9d3c8; border-radius: 11px; background: var(--paper); padding: 8px 11px; }
.tracker-tools { display: flex; align-items: center; gap: 6px; margin: 10px 0 4px; color: var(--muted); font-size: .85rem; }
.tracker-tools span { margin-right: auto; }
.tracker-bulk { position: sticky; top: 72px; z-index: 3; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; margin: 6px 0; border-radius: 12px; background: var(--sage-soft); font-size: .85rem; }
.tracker-bulk span { margin-right: auto; font-weight: 800; color: #3d6f62; }
.tracker-author { display: flex; align-items: center; gap: 9px; margin-top: 7px; padding: 6px 11px; border: 1.5px solid var(--line); border-radius: 13px; background: var(--paper); }
.tracker-author.priority-high { border-color: #f0a99e; }
.tracker-author.priority-low { background: var(--page); }
.tracker-author.is-paused { opacity: .55; }
.tracker-author.is-selected { border-color: var(--sage); background: var(--sage-soft); opacity: 1; }
.tracker-check { width: 20px; height: 20px; flex: none; accent-color: var(--sage); }
.tracker-author-main { flex: 1; min-width: 0; display: grid; gap: 1px; padding: 5px 0; border: 0; background: none; text-align: left; color: var(--ink); }
.tracker-author-main b { font-size: .95rem; overflow-wrap: anywhere; }
.tracker-author-main small { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.tracker-author-main .tracker-changed { color: #a8701d; font-weight: 700; }
.tracker-last { flex: none; font-size: .75rem; color: var(--muted); text-align: right; }
.tracker-switch { flex: none; position: relative; width: 44px; height: 26px; border: 0; border-radius: 999px; background: #d5ddd8; }
.tracker-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.tracker-switch.is-on { background: #5fb08f; }
.tracker-switch.is-on::after { left: 21px; }
.tracker-choice { display: flex; gap: 6px; }
.tracker-choice label { flex: 1; }
.tracker-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tracker-choice span { display: block; text-align: center; padding: 9px 0; border: 1px solid var(--line); border-radius: 10px; font-weight: 800; color: var(--muted); }
.tracker-choice input:checked + span { border-color: var(--sage); background: var(--sage-soft); color: #3d6f62; }
.tracker-choice input:focus-visible + span { outline: 2px solid #90bac7; }
.tracker-sheet .switch-row { margin-top: 12px; }
.tracker-ai { margin-top: 6px; padding: 0 4px; color: var(--muted); font-size: .8rem; }
.tracker-ai.is-warn { color: #a8701d; font-weight: 700; }
.tracker-sheet-text { color: var(--muted); font-size: .88rem; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 9em; overflow: auto; }
.tracker-cats { display: flex; flex-wrap: wrap; gap: 7px; }
.tracker-cats .tracker-cat { border: 1.5px solid transparent; padding: 7px 11px; font-size: .86rem; }
.tracker-cats .tracker-cat.is-current { border-color: currentColor; }
.tracker-more { flex: none; margin-left: auto; min-width: 40px; min-height: 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-weight: 900; }
.tracker-cats .tracker-cat.is-off { opacity: .45; }
.tracker-sheet h3 { margin: 16px 0 8px; font-size: 1rem; }
.tracker-sheet h3:first-child { margin-top: 0; }
.tracker-av { position: relative; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--sage-soft); color: #3d6f62; font-weight: 900; }
.tracker-av.is-tiny { width: 22px; height: 22px; font-size: .7rem; }
.tracker-av.is-small { width: 30px; height: 30px; font-size: .85rem; }
.tracker-av.is-big { width: 38px; height: 38px; font-size: 1rem; }
.tracker-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tracker-fav { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: #fff3dc; color: #b97a14; font-size: .72rem; font-weight: 800; vertical-align: 2px; cursor: pointer; }
.tracker-older { margin-top: 9px; padding-top: 6px; border-top: 1px dashed var(--line); }
.tracker-older-line { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: .82rem; color: #4c5a54; min-width: 0; }
.tracker-older-line span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tracker-older-line small { flex: none; color: var(--muted); }
.tracker-older.is-open .tracker-msg { margin-top: 6px; box-shadow: none; border-style: dashed; }
.tracker-fold { margin-top: 4px; padding: 4px 0; border: 0; background: none; color: var(--sage); font-weight: 800; font-size: .82rem; }
.author-tracker-box { padding: 14px 16px; margin-bottom: 14px; border-color: #cfe5d9; background: #eef7f2; }
.author-tracker-box h2 { margin: 0 0 6px; font-size: 1rem; color: #3d6f62; }
.miss-card.has-signal { border-color: #f3c3ba; }
.miss-signal { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 8px; padding: 6px 6px 6px 12px; border-radius: 11px; background: #fdeeea; color: #c4513f; font-weight: 800; font-size: .86rem; }
.tracker-addfav { flex: none; padding: 4px 8px; border: 1.5px solid #f1d29b; border-radius: 9px; background: var(--paper); color: #b97a14; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.tracker-addfav-all { border-color: #f1d29b; background: #fff3dc; color: #b97a14; }
.tracker-addfav-big { width: 100%; margin-top: 4px; border: 1.5px solid #f1d29b; background: #fff3dc; color: #b97a14; font-weight: 800; }
.tracker-favlist { display: grid; max-height: 50vh; overflow-y: auto; margin: 8px 0; }
.tracker-favrow { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--line); cursor: pointer; }
.tracker-favrow > span { flex: 1; min-width: 0; display: grid; }
.tracker-favrow small { color: var(--muted); font-size: .78rem; }
.tracker-favrow em { flex: none; font-style: normal; font-size: .74rem; color: #a8701d; background: #fdf0d8; border-radius: 6px; padding: 2px 6px; }
.tracker-favrow.is-done { opacity: .5; cursor: default; }
.tracker-guess { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: #fff3dc; color: #8b6114; font-size: .86rem; }

/* 成员管理 folds to one line. */
.members-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; }
.members-fold > summary::-webkit-details-marker { display: none; }
.members-fold > summary h2 { margin: 0; }
.members-fold > summary small { display: block; margin-top: 3px; color: var(--muted); font-size: .82rem; }
.members-fold[open] > summary { margin-bottom: 8px; }
.members-waiting { padding: 1px 7px; border-radius: 99px; background: #fff3d6; color: #8a6a2a; font-weight: 800; }
.members-chevron { flex: none; width: 10px; height: 10px; margin-right: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .18s ease; }
.members-fold[open] .members-chevron { transform: rotate(-135deg); }
.tracker-banner + .tracker-banner { margin-top: -8px; }
.tracker-banner.is-soon { border-color: #f3dfb3; background: #fff8ea; color: #8b5a10; }
.tracker-when { display: flex; align-items: center; gap: 7px; margin: 6px 0 2px; padding: 6px 7px 6px 10px; border-radius: 11px; border: 1px solid #f3dfb3; background: #fff8ea; min-width: 0; }
.tracker-when b { color: #8b5a10; font-size: .95rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tracker-when small { color: #a8701d; font-weight: 800; font-size: .76rem; white-space: nowrap; }
.tracker-when.is-end { border-color: var(--line); background: var(--soft); }
.tracker-when.is-end b { color: #4c5a54; font-size: .88rem; }
.tracker-when.is-end small { color: var(--muted); }
.tracker-when.is-event { border-color: #cfdcf2; background: #f1f5fc; }
.tracker-when.is-event b { color: #3d63a3; }
.tracker-when.is-event small { color: #5f7fb8; }
.tracker-when.is-past { opacity: .55; }
.tracker-when.is-unsure { border-style: dashed; background: var(--paper); }
.tracker-when.is-unsure b { color: var(--muted); font-weight: 700; font-size: .86rem; }
.tracker-bell { margin-left: auto; flex: none; min-width: 34px; min-height: 30px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: .9rem; filter: grayscale(1); opacity: .45; }
.tracker-bell.is-on { filter: none; opacity: 1; border-color: #cfe5d9; background: var(--sage-soft); }
.tracker-when-btn { margin-left: auto; flex: none; min-height: 30px; padding: 3px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: #4c5a54; font-weight: 800; font-size: .8rem; }
.tracker-day { display: flex; align-items: center; gap: 8px; width: 100%; margin: 14px 0 5px; padding: 0; border: 0; background: none; color: var(--sage); font-weight: 900; font-size: .84rem; text-align: left; }
.tracker-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tracker-day.is-past { color: var(--muted); cursor: pointer; }
.tracker-sch { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); min-width: 0; }
.tracker-sch.is-soon { border-color: #f0a99e; background: #fff7f5; }
.tracker-sch.is-past { opacity: .5; }
.tracker-sch-time { flex: none; width: 54px; padding: 2px 0; border: 0; background: none; text-align: center; color: var(--ink); }
.tracker-sch-time b { display: block; font-size: 1rem; }
.tracker-sch-time small { color: var(--muted); font-size: .72rem; }
.tracker-sch-main { flex: 1; min-width: 0; }
.tracker-sch-main div { display: flex; align-items: center; gap: 5px; min-width: 0; }
.tracker-sch-main div b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tracker-sch-main p { margin: 2px 0 0; color: #5f6f68; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tracker-sch-cd { flex: none; color: #c4513f; font-weight: 900; font-size: .74rem; white-space: nowrap; }
.tracker-sch:not(.is-soon) .tracker-sch-cd { color: var(--muted); }
.tracker-sch .tracker-bell { margin-left: 0; }
.tracker-prefs { display: grid; gap: 2px; }
.tracker-pref { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.tracker-pref:last-child { border-bottom: 0; }
.tracker-pref select { max-width: 55%; min-height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); padding: 4px 8px; }

/* 新建摊位: people to bring in, under 社团/作者名称 */
.picker-drop { margin-top: 6px; border: 1.5px solid #cfe5d9; border-radius: 12px; background: var(--paper); box-shadow: 0 10px 24px #2c3a3418; overflow: hidden; }
.picker-row { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.picker-row:first-child { border-top: 0; }
.picker-row:hover, .picker-row:focus-visible { background: #f3faf6; }
.picker-av { position: relative; flex: none; display: grid; place-items: center; width: 28px; height: 28px; overflow: hidden; border-radius: 50%; background: var(--sage-soft); color: #3d6f62; font-weight: 900; font-size: .8rem; }
.picker-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.picker-main { flex: 1; min-width: 0; }
.picker-main b { font-size: .95rem; }
.picker-main small { display: block; margin-top: 1px; color: var(--muted); font-size: .76rem; line-height: 1.4; overflow-wrap: anywhere; }
.picker-badge { margin-left: 5px; padding: 1px 5px; border-radius: 6px; background: #eceff0; color: #6c7b74; font-size: .66rem; font-weight: 900; vertical-align: 1px; }
.picker-badge.is-fav { background: #fff3dc; color: #b97a14; }
.picker-badge.is-trk { background: #e2ecfa; color: #3d63a3; }
.picker-done { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; padding: 8px 10px; border: 1px solid #cfe5d9; border-radius: 11px; background: #eef7f2; color: #3d6f62; font-size: .86rem; }
.picker-done b { color: var(--ink); }
.picker-done button { margin-left: auto; border: 0; background: none; color: #4a8d80; font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; }
.picker-from { margin: 4px 0 0; color: #3d63a3; font-size: .76rem; line-height: 1.45; }
#editor-form .is-filled { border-color: #bfe0cf; background: #f3faf6; }
/* Avatars (作者追踪 and 常用作者): X avatar → 摊宣 → a faint grey figure. */
.tracker-av { background: #e9eeea; }
.tracker-av svg { width: 64%; height: 64%; fill: #bccac2; }
.tracker-av.is-promo { border-radius: 26%; background: #f4efe6; }
.tracker-av.is-list { width: 36px; height: 36px; }
.tracker-av.is-hero { width: 58px; height: 58px; margin-right: 12px; }
.author-hero-name { display: flex; align-items: center; }
.author-hero-name h1 { flex: 1; min-width: 0; }
.tracker-favrow > .tracker-av { flex: none; }
.tracker-fromfav { border-color: #f3dfb3; background: #fff8ea; color: #a8701d; }
.tracker-favhead { margin: 12px 0 2px; font-size: .8rem; font-weight: 900; color: #3d6f62; }
.tracker-favhead.is-warn { color: #a8701d; }
.tracker-favhead.is-done { color: var(--muted); }
.tracker-favlink { flex: 1 1 40%; min-width: 0; min-height: 34px; border: 1px dashed #b9d3c8; border-radius: 9px; padding: 4px 8px; background: var(--paper); font-size: .82rem; }
.tracker-favlink:not(:placeholder-shown) { border-style: solid; border-color: var(--sage); }
.tracker-missed { margin: 6px 0 10px; padding: 0; list-style: none; }
.tracker-missed li { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.tracker-missed li span { min-width: 0; overflow-wrap: anywhere; }
.author-tracker-box.is-join { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--paper); border-color: var(--line); }
.tracker-banner.is-stale { border-color: #f1d29a; background: #fff8ea; color: #8b5a10; }

/* 免登录测试版 notice on the home page (free.instant-nupi.com only). */
.free-notice { position: relative; display: flex; gap: 8px; margin: 0 0 14px; padding: 14px 44px 14px 16px; border-left: 4px solid #d7962a; }
.free-notice-main { flex: 1; min-width: 0; }
.free-notice-main strong { display: block; color: var(--ink); }
.free-notice-main p { margin: 4px 0 10px; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.free-notice-main .page-actions { margin: 0; }
.free-notice-close { position: absolute; top: 8px; right: 8px; }
