/* Sales mobile conversational wizard — phone only (≤767px) */
:root {
  --smw-bg: #f5f5f7;
  --smw-surface: #ffffff;
  --smw-ink: #1d1d1f;
  --smw-muted: #6e6e73;
  --smw-accent: #4f46e5;
  --smw-accent-soft: #f4f4f8;
  --smw-user: #0ea5e9;
  --smw-radius: 16px;
  --smw-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  --smw-safe-b: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body.smw-body {
  margin: 0;
  min-height: 100%;
  background: var(--smw-bg);
  background-image: radial-gradient(
    ellipse 100% 60% at 50% -30%,
    rgba(79, 70, 229, 0.07),
    transparent
  );
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Inter,
    Arial,
    sans-serif;
  color: var(--smw-ink);
  -webkit-font-smoothing: antialiased;
}

.smw-app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
}

.smw-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.smw-top__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.smw-top__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
  flex-shrink: 0;
}

.smw-top__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smw-top__sub {
  font-size: 11px;
  color: var(--smw-muted);
  font-weight: 500;
}

.smw-top__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.smw-icon-btn {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: var(--smw-surface);
  border-radius: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 16px;
  cursor: pointer;
  color: var(--smw-ink);
}

.smw-thread {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 14px 10px;
  scroll-behavior: smooth;
}

.smw-msg {
  display: flex;
  margin-bottom: 10px;
  animation: smw-fade-in 0.35s ease;
}

@keyframes smw-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.smw-msg--bot {
  justify-content: flex-start;
}

.smw-msg--user {
  justify-content: flex-end;
}

.smw-bubble {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: var(--smw-radius);
  font-size: 15px;
  line-height: 1.45;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.smw-msg--bot .smw-bubble {
  background: var(--smw-surface);
  border: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  border-bottom-left-radius: 6px;
  color: var(--smw-ink);
}

.smw-msg--user .smw-bubble {
  background: linear-gradient(135deg, var(--smw-accent), #6366f1);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.smw-bubble strong {
  font-weight: 700;
}

.smw-bubble .smw-kicker {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--smw-muted);
  margin-bottom: 4px;
  opacity: 0.85;
}

.smw-msg--user .smw-bubble .smw-kicker {
  color: rgba(255, 255, 255, 0.75);
}

.smw-typing {
  display: flex;
  gap: 5px;
  padding: 14px 16px;
  background: var(--smw-surface);
  border-radius: var(--smw-radius);
  border-bottom-left-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  width: fit-content;
}

.smw-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  animation: smw-bounce 1.2s infinite ease-in-out;
}

.smw-typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.smw-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes smw-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* Vaulten AI FAB — above composer option cards (module-global-bar loads widget) */
body.smw-body .v1-vaulten-ai-fab {
  bottom: calc(118px + var(--smw-safe-b));
  right: 12px;
  z-index: 10040;
}

body.smw-body .v1-vaulten-ai-panel {
  z-index: 10045;
}

.smw-ai-hint-wrap {
  margin: 0;
  padding: 4px 14px 0;
  text-align: center;
}

.smw-ai-hint-wrap__summary {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--smw-muted);
  cursor: pointer;
  list-style: none;
  padding: 4px 10px;
  border-radius: 999px;
}

.smw-ai-hint-wrap__summary::-webkit-details-marker {
  display: none;
}

.smw-ai-hint {
  margin: 8px 0 0;
  padding: 0 4px 4px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--smw-muted);
  text-align: center;
}

.smw-ai-hint strong {
  color: var(--smw-accent);
  font-weight: 700;
}

.smw-composer {
  position: sticky;
  bottom: 0;
  z-index: 50;
  padding: 6px 14px calc(10px + var(--smw-safe-b));
  padding-right: max(14px, calc(14px + env(safe-area-inset-right, 0px)));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

/* Assistant conversation option cards */
.smw-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-right: 48px;
}

.smw-options--inline {
  padding-right: 0;
  margin-top: 4px;
}

.smw-opt {
  appearance: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fff;
  color: var(--smw-ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.12s ease,
    background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.smw-opt:active:not(:disabled) {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
}

.smw-opt:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.smw-opt__icon {
  flex-shrink: 0;
  width: 1.35rem;
  font-size: 1.1rem;
  line-height: 1.35;
  text-align: center;
  opacity: 0.9;
}

.smw-opt__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.smw-opt__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--smw-ink);
}

.smw-opt__sub {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--smw-muted);
}

.smw-opt--action {
  border-color: rgba(15, 23, 42, 0.1);
  background: #f8fafc;
}

.smw-opt--action:not(:disabled) .smw-opt__title {
  color: #0f172a;
}

.smw-opt--action:disabled {
  background: #fff;
}

.smw-opt--quiet {
  border-style: dashed;
  border-color: rgba(15, 23, 42, 0.1);
  background: transparent;
  box-shadow: none;
}

.smw-opt--quiet .smw-opt__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--smw-muted);
}

.smw-opt--quiet .smw-opt__sub {
  font-size: 11px;
}

.smw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.smw-chip {
  appearance: none;
  border: none;
  background: var(--smw-accent-soft);
  color: var(--smw-accent);
  font: 600 14px/1.2 inherit;
  padding: 11px 14px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    transform 0.12s ease,
    background 0.12s ease;
}

.smw-chip:active {
  transform: scale(0.97);
}

.smw-chip--wide {
  width: 100%;
  border-radius: 14px;
  text-align: left;
}

.smw-chip--primary {
  background: linear-gradient(135deg, var(--smw-accent), #6366f1);
  color: #fff;
  border-color: transparent;
}

.smw-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.smw-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--smw-muted);
  margin-bottom: 5px;
}

.smw-field input,
.smw-field select,
.smw-field textarea {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  padding: 12px 12px;
  font: inherit;
  font-size: 16px;
  background: #fff;
}

.smw-field textarea {
  min-height: 72px;
  resize: vertical;
}

.smw-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Items line: narrow Qty, wider Price */
.smw-row-qty-price {
  display: grid;
  grid-template-columns: minmax(4.5rem, 28%) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.smw-row-qty-price #smw-qty {
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.smw-row-qty-price #smw-price {
  text-align: right;
}

.smw-submit {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font: 700 15px inherit;
  background: linear-gradient(135deg, var(--smw-accent), #6366f1);
  color: #fff;
  cursor: pointer;
  margin-top: 4px;
}

.smw-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.smw-submit--ghost {
  background: #fff;
  color: var(--smw-accent);
  border: 1px solid rgba(79, 70, 229, 0.35);
}

.smw-summary {
  font-size: 13px;
  color: var(--smw-muted);
  line-height: 1.5;
}

.smw-summary dt {
  font-weight: 600;
  color: var(--smw-ink);
  margin-top: 8px;
}

.smw-summary dd {
  margin: 2px 0 0;
}

.smw-record {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 8px;
  cursor: pointer;
  font: inherit;
}

.smw-record__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}

.smw-record__meta {
  font-size: 12px;
  color: var(--smw-muted);
  margin-top: 4px;
}

.smw-done-success {
  text-align: center;
}

.smw-done-success__mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-size: 24px;
  font-weight: 700;
  line-height: 48px;
}

.smw-done-success__no {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--smw-muted);
}

.smw-done {
  text-align: center;
  padding: 4px 0;
}

.smw-done__lead {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--smw-muted);
  line-height: 1.45;
}

.smw-done__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.smw-submit--hero {
  padding: 16px 18px;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
}

.smw-done__secondary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.smw-done-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--smw-ink);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  line-height: 1.25;
}

.smw-done-tile:active {
  background: var(--smw-accent-soft);
}

.smw-inline-help {
  margin-top: 8px;
  font-size: 13px;
  color: var(--smw-muted);
}

.smw-inline-help__p {
  margin: 6px 0 0;
  line-height: 1.45;
}

.smw-inline-help summary {
  font-weight: 600;
  color: var(--smw-accent);
  cursor: pointer;
}

.smw-summary--confirm {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* stepConfirm — final review card (composer only) */
.smw-confirm {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.smw-confirm-card {
  background: var(--smw-surface);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
}

.smw-confirm-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

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

.smw-confirm-row--total .smw-confirm-row__value {
  font-size: 16px;
}

.smw-confirm-row__label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--smw-muted);
  padding-top: 2px;
}

.smw-confirm-row__value {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--smw-ink);
  text-align: right;
  line-height: 1.35;
  word-break: break-word;
}

.smw-confirm-row__sub {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--smw-muted);
}

.smw-confirm-total {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.smw-confirm-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
}

.smw-confirm-badge--paid {
  background: #dcfce7;
  color: #15803d;
}

.smw-confirm-badge--active {
  background: #f1f5f9;
  color: #475569;
}

.smw-confirm-badge--awaiting {
  background: #fef3c7;
  color: #92400e;
}

.smw-confirm-save.smw-submit {
  margin-top: 0;
  padding: 15px 16px;
  font-size: 16px;
  background: #111827;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.smw-confirm-save.smw-submit:active:not(:disabled) {
  background: #1f2937;
}

.smw-confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.smw-confirm-link {
  flex: 1;
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 11px;
  background: #fff;
  padding: 10px 8px;
  font: 600 13px inherit;
  color: var(--smw-ink);
  cursor: pointer;
  text-align: center;
  line-height: 1.25;
}

.smw-confirm-link:active {
  background: #f8fafc;
}

.smw-desktop-hint {
  font-size: 12px;
  color: var(--smw-muted);
  text-align: center;
  margin-top: 12px;
}

.smw-desktop-hint a {
  color: var(--smw-accent);
  font-weight: 600;
}

.smw-error {
  color: #b91c1c;
  font-size: 13px;
  margin-top: 8px;
}

.smw-item-card {
  border: 1px dashed rgba(79, 70, 229, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 13px;
  background: #fafbff;
}

.smw-ocr-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--smw-muted);
}

.smw-ocr-upload-panel {
  gap: 10px;
  padding-bottom: 4px;
}

.smw-doc-sources {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 2px;
}

.smw-doc-sources .smw-opt {
  padding: 9px 10px;
}

.smw-doc-sources .smw-opt__title {
  font-size: 13px;
}

.smw-doc-sources .smw-opt__sub {
  font-size: 11px;
}

.smw-doc-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.smw-ocr-continue-wrap {
  margin-top: 2px;
}

.smw-ocr-continue-wrap[hidden] {
  display: none !important;
}

.smw-options--continue {
  padding-right: 0;
  margin-bottom: 0;
}

.smw-ocr-upload-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 72px;
}

.smw-ocr-upload-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--smw-muted);
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.smw-ocr-upload-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.smw-ocr-upload-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 88px;
  padding: 12px 10px;
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.smw-ocr-upload-btn--camera {
  border-color: #7dd3fc;
  background: linear-gradient(180deg, #f0f9ff 0%, #fff 100%);
}

.smw-ocr-upload-btn--gallery {
  border-color: #cbd5e1;
  background: #fafbfc;
}

.smw-ocr-upload-btn:active {
  transform: scale(0.98);
}

.smw-ocr-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.smw-ocr-upload-btn__icon {
  font-size: 1.5rem;
  line-height: 1;
}

.smw-ocr-upload-btn__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--smw-ink);
  line-height: 1.2;
}

.smw-ocr-upload-btn__sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--smw-muted);
  line-height: 1.3;
}

.smw-ocr-upload-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}

.smw-ocr-upload-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.smw-ocr-upload-thumb__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.smw-ocr-upload-thumb__lbl {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 4px 3px;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.72));
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smw-ocr-upload-thumb--file {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #f1f5f9;
}

.smw-ocr-upload-thumb__file {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}

.smw-ocr-upload-thumb--add {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  border: 2px dashed #94a3b8;
  background: #f8fafc;
  color: #475569;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.smw-ocr-upload-thumb__add {
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  color: #175e7d;
}

.smw-ocr-total {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--smw-ink);
}

.smw-ocr-item {
  padding: 12px 0;
  border-top: 1px solid #e8edf5;
}

.smw-ocr-item-fields,
.smw-item-draft-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#smw-ocr-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.smw-ocr-items-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.smw-ocr-items-actions .smw-submit--ghost {
  margin-top: 0;
}

#smw-item-form .smw-submit + .smw-submit {
  margin-top: 0;
}

.smw-ocr-remove {
  appearance: none;
  border: 0;
  background: none;
  color: #b91c1c;
  font: 600 13px inherit;
  padding: 6px 0;
  cursor: pointer;
}

body.smw-review-open {
  overflow: hidden;
}

body.smw-review-open .smw-composer {
  visibility: hidden;
  pointer-events: none;
}

.smw-ocr-reopen-bar {
  padding: 12px 14px calc(12px + var(--smw-safe-b));
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.smw-ocr-reopen-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--smw-muted);
}

.smw-review-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  max-width: 520px;
  margin: 0 auto;
  left: 0;
  right: 0;
}

.smw-review-sheet[hidden] {
  display: none !important;
}

.smw-review-sheet__head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.smw-review-sheet__close {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
}

.smw-review-sheet__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--smw-ink);
}

.smw-review-sheet__sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--smw-muted);
  line-height: 1.4;
}

.smw-review-sheet__body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px calc(24px + var(--smw-safe-b));
}

.smw-form--review {
  gap: 0;
}

.smw-review-section {
  padding: 14px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.smw-review-section:last-of-type {
  border-bottom: none;
}

.smw-review-section__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--smw-ink);
}

.smw-review-section__hint {
  margin: -4px 0 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--smw-muted);
}

.smw-review-section--pay {
  padding-bottom: 8px;
}

.smw-review-form-foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0 -14px;
  padding: 12px 14px calc(12px + var(--smw-safe-b));
  background: linear-gradient(
    180deg,
    rgba(248, 250, 252, 0) 0%,
    rgba(248, 250, 252, 0.92) 24%,
    #f8fafc 100%
  );
  border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.smw-review-primary {
  margin-top: 0;
}

.smw-review-form-foot .smw-opt--action {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.smw-review-form-foot .smw-opt--action:active {
  background: #f8fafc;
}

.smw-review-form-foot .smw-opt__title {
  font-size: 15px;
}

.smw-ocr-items-actions {
  margin-top: 4px;
}

.smw-ocr-items-actions .smw-submit--ghost {
  order: -1;
}

.smw-ocr-read {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 8px 0;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.smw-ocr-read__k {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  min-width: 4.5rem;
}

.smw-ocr-read__v {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

.smw-ocr-hint--banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.smw-ocr-hint--upload-ok {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--smw-ink);
}

.smw-form--review .smw-submit {
  margin-top: 4px;
}

.smw-records-board {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.smw-records-board__head {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--smw-ink);
}

.smw-records-board__filter {
  margin: 0;
}

.smw-records-board__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.smw-records-board__list .smw-record {
  margin-top: 0;
}

.smw-records-board__list .smw-record + .smw-record {
  margin-top: 8px;
}

.smw-records-loading,
.smw-records-empty {
  margin: 0;
  font-size: 13px;
  color: var(--smw-muted);
  text-align: center;
  padding: 12px 8px;
}

@media (min-width: 768px) {
  .smw-desktop-only {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 24px;
    text-align: center;
  }
  .smw-app {
    display: none;
  }
}
