/* 非首屏视图样式；首屏关键样式内联在 index.html */

.bar { flex: none; display: flex; align-items: center; height: 48px; padding: 0 12px 0 4px; }
.bar-back { flex: none; width: 40px; height: 40px; border: 0; background: transparent; font-size: 30px; line-height: 36px; color: #1f1f22; font-family: inherit; }
.bar-title { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step { display: inline-block; font-size: 12px; font-weight: 700; color: #fff; background: #1f1f22; border-radius: 10px; padding: 0 7px; line-height: 20px; margin-right: 8px; vertical-align: 2px; }
.bar-action { flex: none; height: 32px; padding: 0 12px; border: 1px solid #ff2442; border-radius: 16px; background: #fff; color: #ff2442; font-size: 13px; font-weight: 600; font-family: inherit; }

.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; padding: 8px 16px 20px; }
.foot { flex: none; padding: 10px 16px 12px; background: #f4f1ea; box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.06); }
.typing .foot { display: none; }
.hint { font-size: 12px; color: #8a8a95; text-align: center; margin: 14px 0 10px; }

button { cursor: pointer; }
button:active { opacity: 0.75; }
button:focus { outline: 2px solid rgba(255, 36, 66, 0.35); outline-offset: 1px; }
button:focus:not(:focus-visible) { outline: none; }

/* 第 1 步 */
.swatches { display: flex; justify-content: space-between; margin-top: 6px; }
.swatch { flex: 1; min-width: 0; margin-left: 8px; border: 2px solid transparent; border-radius: 12px; background: #fff; padding: 8px 2px 6px; font-family: inherit; font-size: 12px; color: #4a4a52; }
.swatch:first-child { margin-left: 0; }
.swatch i { display: block; width: 34px; height: 44px; margin: 0 auto 6px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.swatch[aria-checked="true"] { border-color: #ff2442; color: #ff2442; font-weight: 700; }
.preview-wrap { text-align: center; }
.preview-canvas { width: 72%; max-width: 320px; height: auto; display: inline-block; border-radius: 4px; }

/* 第 2 步 */
.pick-count { font-size: 15px; font-weight: 700; text-align: center; margin: 4px 0 14px; }
.pick-count b { color: #ff2442; }
.chips { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-gap: 10px; }
.chip { height: 46px; border: 1px solid #dedad0; border-radius: 12px; background: #fff; color: #1f1f22; font-size: 14px; font-family: inherit; padding: 0 4px; }
.chip[aria-pressed="true"] { background: #ff2442; border-color: #ff2442; color: #fff; font-weight: 700; }

/* 第 3 步 */
.card { background: #fff; border-radius: 14px; padding: 14px 14px 4px; margin-bottom: 12px; }
.field { display: block; margin-bottom: 12px; }
.field-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field-label em { font-style: normal; font-weight: 400; color: #8a8a95; margin-left: 4px; }
.input { display: block; width: 100%; height: 42px; border: 1px solid #e3e0d8; border-radius: 10px; background: #faf9f6; padding: 0 12px; font-size: 16px; color: #1f1f22; font-family: inherit; -webkit-user-select: text; user-select: text; -webkit-appearance: none; appearance: none; }
.input:focus { outline: none; border-color: #ff2442; background: #fff; }
.input.invalid { border-color: #ff2442; background: #fff3f5; }
.item-head { display: flex; align-items: center; margin-bottom: 10px; }
.item-no { flex: none; font-size: 12px; color: #fff; background: #1f1f22; border-radius: 4px; padding: 0 5px; line-height: 18px; margin-right: 8px; }
.item-cat { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; }
.item-req { flex: none; font-size: 12px; color: #ff2442; }
.item-row { margin-bottom: 10px; }
.score-row { display: flex; align-items: center; margin-bottom: 12px; }
.score-label { flex: none; font-size: 13px; color: #4a4a52; margin-right: 10px; }
.score-range { flex: 1; min-width: 0; height: 28px; background: transparent; -webkit-appearance: none; appearance: none; }
.score-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: #f0d9dc; }
.score-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #ff2442; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.score-range:focus { outline: none; }
.score-num { flex: none; width: 58px; height: 34px; margin-left: 10px; border: 1px solid #e3e0d8; border-radius: 8px; text-align: center; font-size: 16px; font-weight: 700; color: #ff2442; background: #faf9f6; font-family: inherit; -webkit-user-select: text; user-select: text; -webkit-appearance: none; appearance: none; -moz-appearance: textfield; }
.score-num::-webkit-inner-spin-button, .score-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.draft-status { font-size: 12px; color: #8a8a95; text-align: center; min-height: 18px; margin-top: 4px; }

/* 结果 */
.result-scroll { text-align: center; padding-top: 4px; }
.receipt-canvas { width: 100%; height: auto; display: block; border-radius: 6px; }
.result-hint { font-size: 13px; line-height: 1.6; color: #4a4a52; background: #fff; border-radius: 10px; padding: 10px 12px; margin-top: 12px; text-align: left; }
.actions { display: flex; }
.actions > * { flex: 1; min-width: 0; }
.actions > * + * { margin-left: 10px; }
.btn-ghost { height: 50px; border: 2px solid #1f1f22; border-radius: 25px; background: #fff; color: #1f1f22; font-size: 16px; font-weight: 700; font-family: inherit; }
.btn-ghost:disabled { opacity: 0.5; }
.btn-text { display: block; width: 100%; height: 36px; margin-top: 6px; border: 0; background: transparent; color: #4a4a52; font-size: 14px; font-family: inherit; text-decoration: underline; }

.toast { position: absolute; left: 50%; bottom: 120px; max-width: 82%; -webkit-transform: translateX(-50%); transform: translateX(-50%); background: rgba(20, 20, 24, 0.88); color: #fff; font-size: 14px; line-height: 1.5; padding: 9px 16px; border-radius: 10px; text-align: center; z-index: 10; pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .chip, .swatch { transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
}
