:root {
  --bg: #eef1f5;
  --surface: #ffffff;
  --ink: #1a2332;
  --muted: #6b7785;
  --line: #d8dee6;
  --brand: #1f6f5b;
  --brand-2: #2a9d7c;
  --warn: #b45309;
  --danger: #b42318;
  --ok: #1f6f5b;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --bottom-bar-space: calc(96px + var(--safe-bottom));
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* 全局禁用阴影（含 Bootstrap 默认按钮阴影） */
*,
*::before,
*::after {
  box-shadow: none !important;
  text-shadow: none !important;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  overscroll-behavior-y: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* 弹层打开时锁住背景（配合 JS 记录 scrollY） */
body.body-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

[v-cloak] { display: none; }

#app {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
}

.auth-gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(24px + var(--safe-top)) 20px calc(24px + var(--safe-bottom));
  background: linear-gradient(160deg, #1a2332 0%, #243447 55%, #1f6f5b 160%);
}

.auth-card {
  width: min(360px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
}

.auth-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
}

.auth-desc {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(160deg, #1a2332 0%, #243447 100%);
  color: #fff;
  padding: calc(14px + var(--safe-top)) 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-hint.ok {
  background: #e8f6ee;
  color: #166534;
}

.action-btn {
  margin: 0 0 12px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.history-row {
  cursor: default;
}

.history-row .item-info {
  cursor: pointer;
}

.history-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.header-sub {
  margin-top: 4px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}

.step-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding-bottom: 14px;
  min-width: 0;
}

.step-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

.step-btn.active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}

.step-btn.done:not(.active) {
  color: #9fe3c8;
}

.step-btn:disabled {
  opacity: 0.4;
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.step-btn.active .step-num {
  background: var(--brand);
  color: #fff;
}

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  min-width: 8px;
}

.step-line.on {
  background: #9fe3c8;
}

.app-main {
  padding: 14px 14px 0;
}

.panel-hint {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #e7f3ef;
  color: #1f4d40;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 12px;
}

.panel-hint .bi {
  margin-top: 0.15em;
  flex-shrink: 0;
  line-height: 1;
}

.panel-hint > span {
  flex: 1;
  min-width: 0;
}

.add-price-bar {
  margin-bottom: 12px;
}

.field-error {
  margin-top: 6px;
  color: var(--danger);
  font-size: 0.85rem;
}

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.item-row.counted {
  border-color: #9dcbba;
  background: #f5fbf8;
}

.item-row.anomaly {
  border-color: #f0b4ae;
}

.item-info {
  min-width: 0;
  flex: 1;
}

.item-name {
  font-weight: 700;
  font-size: 1.15rem;
}

.item-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qty-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f7f9fb;
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.qty-btn.danger {
  color: var(--danger);
  border-color: #f0c2bd;
  background: #fff7f6;
}

.qty-btn:active:not(:disabled) {
  background: #e8eef4;
}

.qty-btn:disabled {
  opacity: 0.4;
}

.qty-input {
  width: 56px;
  height: 40px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  appearance: textfield;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-display {
  min-width: 56px;
  height: 40px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  background: #fff;
  color: var(--ink);
  line-height: 1;
}

.item-row.tapable {
  cursor: pointer;
}

.item-row.tapable:active {
  transform: scale(0.995);
}

.item-row.flash {
  animation: flash-row 1.1s ease;
}

@keyframes flash-row {
  0%, 100% { border-color: var(--line); }
  30% { border-color: var(--brand-2); background: #f5fbf8; }
}

.meta-link {
  color: var(--brand);
  font-weight: 600;
}

.btn-revise {
  color: #1a2332 !important;
  background: #fff !important;
  border-color: #fff !important;
}

.header-actions .btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  line-height: 1;
}

.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  z-index: 60;
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 110%);
  width: min(560px, 100%);
  max-height: min(88vh, 100%);
  max-height: min(88dvh, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  z-index: 70;
  padding: 4px 14px 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  transition: transform 0.22s ease;
}

.sheet.open {
  transform: translate(-50%, 0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: #d0d7e0;
  margin: 8px auto 8px;
  flex-shrink: 0;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.sheet-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.sheet-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.sheet-close {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  line-height: 1;
}

.sheet-body {
  padding-bottom: 8px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  /* 给滚动区明确上限，避免仅靠父级 max-height 时 WebKit 形不成 scrollport */
  max-height: min(60vh, calc(88vh - 9.5rem));
  max-height: min(60dvh, calc(88dvh - 9.5rem));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.sheet-body::-webkit-scrollbar {
  display: none;
}

.recount-block {
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
}

.recount-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.recount-ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.recount-ctrl.single {
  margin-top: 4px;
}

.qty-btn.lg {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 1.25rem;
}

.recount-input {
  width: 88px;
  height: 52px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 52px;
  padding: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.recount-input.xl {
  width: 110px;
  height: 56px;
  font-size: 1.85rem;
  line-height: 56px;
}

.recount-input::-webkit-outer-spin-button,
.recount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quick-panel {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.quick-adds {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.quick-adds.center {
  justify-content: center;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  min-width: 52px;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.chip.plus {
  border-color: #9dcbba;
  color: var(--brand);
  background: #f5fbf8;
}

.chip.minus {
  border-color: #e2e8f0;
  color: #475569;
}

.chip.danger {
  border-color: #f0c2bd;
  color: var(--danger);
  background: #fff7f6;
}

.chip:active {
  background: #eef3f0;
}

.recount-preview {
  text-align: center;
  margin: 8px 0 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.sheet-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-shrink: 0;
}

.sheet-actions.sticky {
  position: sticky;
  bottom: 0;
  padding: 10px 0 calc(12px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(255,255,255,0.85), #fff 35%);
  border-top: 1px solid var(--line);
}

.bottom-spacer.dual-actions {
  height: var(--bottom-bar-space);
  height: calc(110px + var(--safe-bottom));
}

.bottom-spacer {
  height: var(--bottom-bar-space);
}

.bottom-spacer.tall {
  height: calc(110px + var(--safe-bottom));
}

.bottom-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(720px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px calc(12px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 15;
}

.bottom-bar.dual .btn-outline-secondary {
  min-width: 52px;
  flex-shrink: 0;
}

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  line-height: 1;
}

.btn-icon.btn-sm {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}

.btn-icon.btn-lg {
  width: 52px;
  height: 48px;
  min-width: 52px;
  min-height: 48px;
}

.sheet-cancel {
  min-width: 52px;
  flex-shrink: 0;
}

/* 纯图标按钮：抵消 bootstrap-icons 默认 vertical-align，避免视觉偏下 */
.qty-btn .bi,
.btn-icon .bi,
.header-actions .btn .bi,
.sheet-close .bi,
.drawer-head .btn .bi {
  display: block;
  line-height: 1;
}

.qty-btn .bi::before,
.btn-icon .bi::before,
.header-actions .btn .bi::before,
.sheet-close .bi::before,
.drawer-head .btn .bi::before,
.result-hero .bi::before,
.empty-state .bi::before,
.panel-hint .bi::before,
.alert-banner .bi::before,
.action-btn .bi::before,
.btn:not(.btn-icon) > .bi::before {
  vertical-align: 0;
}

/* 文案 + 图标：水平垂直居中 */
.btn:not(.btn-icon):has(> .bi),
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  line-height: 1.25;
}

.bottom-bar .btn.flex-grow-1:has(> .bi),
.btn.w-100:has(> .bi),
.action-btn.w-100 {
  display: flex;
}

.btn:not(.btn-icon) > .bi,
.action-btn .bi {
  line-height: 1;
  flex-shrink: 0;
}

.alert-banner .bi {
  margin-top: 0.15em;
  flex-shrink: 0;
  line-height: 1;
}

.alert-banner > div,
.alert-banner > span {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-2);
  --bs-btn-hover-border-color: var(--brand-2);
  --bs-btn-active-bg: #185a4a;
  --bs-btn-active-border-color: #185a4a;
}

.btn-success {
  --bs-btn-bg: #1f6f5b;
  --bs-btn-border-color: #1f6f5b;
  --bs-btn-hover-bg: #2a9d7c;
  --bs-btn-hover-border-color: #2a9d7c;
}

.summary-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.summary-cards.three {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 560px) {
  .summary-cards.three {
    grid-template-columns: 1fr 1fr;
  }
  .summary-cards.three .stat:last-child {
    grid-column: 1 / -1;
  }
}

.alert-banner {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.9rem;
  margin: 0 0 12px;
}

.alert-banner.warn {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fdba74;
}

.row-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.field-hint {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.req {
  color: var(--danger);
  font-weight: 600;
}

.opt {
  color: var(--muted);
}

.result-note {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.is-invalid {
  border-color: #f0b4ae !important;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 76px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.2;
}

.stat-value {
  margin-top: 4px;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.sold-amount {
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  align-self: center;
}

.item-row.sold-row {
  align-items: flex-start;
}

.item-row.sold-row .sold-amount {
  padding-top: 4px;
}

.cash-form .input-group-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
}

.diff-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.diff-row:last-child {
  border-bottom: 0;
}

.diff-row span {
  line-height: 1.3;
}

.diff-row strong {
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.2;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.diff-row.ok strong { color: var(--ok); }
.diff-row.short strong { color: var(--danger); }
.diff-row.over strong { color: var(--warn); }

.section-title {
  margin: 18px 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
}

.sold-amount.neg {
  color: var(--danger);
}

.cash-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.pay-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.pay-field .form-label {
  margin-bottom: 6px;
}

.pay-total {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #e7f3ef;
  color: #1f4d40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.item-list.compact .item-row {
  align-items: center;
}

.item-row .item-name {
  line-height: 1.2;
}

.empty-state p {
  margin: 0 0 14px;
  line-height: 1.4;
}

.history-row {
  align-items: center;
}

.pay-total strong {
  font-size: 1.2rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

@media (min-width: 560px) {
  .pay-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.diff-box {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 14px;
}

.result-hero {
  text-align: center;
  border-radius: var(--radius);
  padding: 28px 16px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.result-hero.ok {
  color: var(--ok);
}

.result-hero.warn {
  color: var(--danger);
}

.result-hero .bi {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
  margin: 0 auto;
}

.result-hero h1 {
  margin: 10px 0 6px;
  font-size: 1.5rem;
  color: inherit;
}

.result-hero p {
  margin: 0;
  opacity: 0.75;
  font-size: 0.9rem;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

.empty-state .bi {
  display: block;
  font-size: 2rem;
  line-height: 1;
  margin: 0 auto 10px;
}

.empty-inline {
  text-align: center;
  color: var(--muted);
  padding: 18px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

.cash-form .form-control,
.cash-form textarea {
  font-size: 16px; /* 避免 iOS 聚焦自动放大 */
  scroll-margin-bottom: calc(120px + var(--safe-bottom));
  scroll-margin-top: 80px;
}

.recount-input {
  scroll-margin-bottom: 100px;
  scroll-margin-top: 24px;
}

@media (max-width: 380px) {
  .step-btn {
    padding: 8px;
    gap: 4px;
    font-size: 0.78rem;
  }

  .step-line {
    min-width: 4px;
  }

  .header-sub {
    font-size: 0.72rem;
  }
}

.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  z-index: 40;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 92vw);
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  background: var(--surface);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--line);
  padding-top: var(--safe-top);
  pointer-events: none;
}

.drawer.open {
  transform: translateX(0);
  pointer-events: auto;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.drawer-head .btn {
  min-width: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.drawer-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.drawer-body {
  overflow: auto;
  padding: 14px 16px calc(40px + var(--safe-bottom));
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  flex: 1;
  min-height: 0;
}

.drawer-body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.drawer-desc {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.add-form {
  margin: 0 0 4px;
  padding: 0;
  background: none;
  border: none;
}

.add-price-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-price-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 40px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.add-price-yen {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1;
  flex-shrink: 0;
}

.add-price-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  padding: 8px 0;
  line-height: 1.2;
}

.add-price-input::placeholder {
  font-weight: 400;
  color: #9aa3ad;
}

.add-price-submit {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 600;
}

/* 全局去掉 number 原生上下箭头 */
input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.settings-block {
  margin-top: 20px;
}

.settings-block .section-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.settings-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.settings-count {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.settings-prices {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.settings-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 6px 0 14px;
  border-bottom: 1px solid #eef1f5;
}

.settings-price-row:last-child {
  border-bottom: none;
}

.settings-price-value {
  font-size: 0.98rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.settings-del-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.settings-del-btn .bi {
  display: block;
  font-size: 1.1rem;
  line-height: 1;
}

.settings-del-btn .bi::before {
  vertical-align: 0;
}

.settings-del-btn:active {
  color: var(--danger);
  background: #fef2f1;
}

.settings-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.settings-restore {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 18px;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.2;
}

.settings-restore .bi {
  line-height: 1;
  font-size: 0.95rem;
}

.settings-restore .bi::before {
  vertical-align: 0;
}

.settings-restore:active {
  color: var(--brand);
}

.btn-icon-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  line-height: 1.25;
}

.btn-icon-text .bi {
  line-height: 1;
  flex-shrink: 0;
}

.btn-icon-text .bi::before {
  vertical-align: 0;
}

.field-error {
  margin-top: 6px;
  color: var(--danger);
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .qty-btn {
    width: 44px;
    height: 44px;
  }

  .qty-input {
    width: 64px;
    height: 44px;
  }
}
