* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f5f5; color: #333; line-height: 1.5; }
.wrap { max-width: 480px; margin: 0 auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
header { text-align: center; padding: 12px 0 4px; }
h1 { font-size: 22px; color: #a8626d; }
.sub { font-size: 14px; color: #888; }
.card { background: #fff; border-radius: 12px; padding: 16px; margin-top: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
h2 { font-size: 16px; margin-bottom: 12px; color: #555; }
.btn { display: inline-block; width: 100%; padding: 14px; border: 1px solid #a8626d; border-radius: 24px; background: #fff; color: #a8626d; font-size: 16px; text-align: center; cursor: pointer; text-decoration: none; }
.btn.primary { background: #a8626d; color: #fff; }
.btn:disabled { border-color: #ccc; color: #bbb; background: #f5f5f5; cursor: not-allowed; }
.btn-text { background: none; border: none; color: #a8626d; font-size: 14px; padding: 10px; margin-top: 8px; cursor: pointer; text-decoration: underline; }
.hidden { display: none !important; }
.preview img { width: 100%; border-radius: 8px; display: block; margin-top: 12px; }
.styles { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.style { flex: 0 0 auto; width: 84px; text-align: center; cursor: pointer; border: 2px solid transparent; border-radius: 10px; padding: 6px 4px; background: #fafafa; }
.style.selected { border-color: #a8626d; background: #fdf3f4; }
.style .thumb-preview { width: 72px; height: 72px; border-radius: 8px; margin: 0 auto 6px; position: relative; overflow: hidden; }
.style .name { font-size: 13px; color: #555; }
#loading { text-align: center; padding: 20px 0; color: #888; font-size: 14px; }
.spinner { width: 32px; height: 32px; margin: 0 auto 10px; border: 3px solid #eee; border-top-color: #a8626d; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#error { text-align: center; padding: 12px 0; }
.err-msg { color: #c0392b; font-size: 14px; margin-bottom: 10px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare figure { text-align: center; }
.compare img { width: 100%; border-radius: 8px; display: block; }
.compare figcaption { font-size: 13px; color: #888; padding: 4px 0; }
.actions { margin-top: 12px; display: flex; flex-direction: column; align-items: center; }
footer { text-align: center; padding: 16px 0; font-size: 12px; color: #aaa; }

/* 店铺信息区 */
.shop-head { display: flex; align-items: center; justify-content: center; gap: 12px; }
.shop-logo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 1px solid #eee; }
#shopContact { margin-bottom: 4px; color: #888; }

/* 上传提示 */
.hint { font-size: 13px; color: #999; margin-bottom: 10px; }
/* 全屏查看 */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 999; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 85vh; object-fit: contain; touch-action: pinch-zoom; }
.lightbox-tip { color: #888; font-size: 12px; margin-top: 14px; }

.hint { font-size: 12px; color: #aaa; margin-top: 6px; }

/* 本机历史 */
.history-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.history-item { flex: 0 0 auto; width: 86px; cursor: pointer; text-align: center; border: 1px solid #eee; border-radius: 8px; padding: 4px; position: relative; }
.history-item img { width: 78px; height: 78px; object-fit: cover; border-radius: 6px; display: block; }
.history-item .h-name { font-size: 11px; color: #888; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item .h-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: #a8626d; color: #fff; font-size: 12px; line-height: 20px; text-align: center; border: none; padding: 0; }
