* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f4f4; color: #222; font-size: 16px; line-height: 1.5; }
.wrap { max-width: 430px; margin: 0 auto; background: #fff; min-height: 100vh; padding-bottom: 90px; box-shadow: 0 0 24px rgba(0,0,0,.08); }
@media (max-width: 430px) { .wrap { box-shadow: none; } }
.topbar { position: sticky; top: 0; z-index: 20; background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #eee; }
.logo { font-weight: 700; font-size: 17px; }
.top-right { display: flex; gap: 8px; align-items: center; }
.quota-chip { font-size: 12px; background: #fff3e0; color: #e65100; border-radius: 20px; padding: 4px 10px; }
.btn-small { border: 1px solid #ddd; background: #fff; border-radius: 20px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
h1 { font-size: 22px; line-height: 1.4; margin-bottom: 8px; }
h2 { font-size: 18px; margin-bottom: 12px; }
h3 { font-size: 16px; margin: 14px 0 8px; }
.sub { color: #666; font-size: 14px; }
.hero { padding: 20px 16px 8px; }
.before-after { position: relative; margin-top: 14px; border-radius: 12px; overflow: hidden; }
.before-after img { width: 100%; display: block; }
.ba-tag { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 20px; }
.card { margin: 14px 16px; padding: 16px; border: 1px solid #f0e6dc; border-radius: 14px; background: #fff7f0; }
.view > h2 { padding: 20px 16px 0; }
.upload-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed #ff8c42; border-radius: 12px; padding: 22px 12px; background: #fff; cursor: pointer; text-align: center; font-size: 16px; font-weight: 600; }
.upload-drop small { font-weight: 400; color: #888; font-size: 13px; }
.up-icon { font-size: 28px; }
.input { width: 100%; min-height: 48px; border: 1px solid #ddd; border-radius: 10px; padding: 10px 12px; font-size: 16px; margin-top: 12px; background: #fff; }
.btn-primary { width: 100%; min-height: 52px; border: none; border-radius: 12px; background: #ff6a00; color: #fff; font-size: 17px; font-weight: 700; margin-top: 14px; cursor: pointer; }
.btn-primary:disabled { background: #ccc; }
.btn-ghost { width: 100%; min-height: 48px; border: 1px solid #ddd; border-radius: 12px; background: #fff; font-size: 15px; cursor: pointer; margin-top: 10px; }
.preview-box { position: relative; margin-top: 12px; border-radius: 12px; overflow: hidden; }
.preview-box img { width: 100%; display: block; }
.preview-name { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 6px; }
.detect { background: #fff; border-radius: 12px; padding: 12px; margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #f5f5f5; border-radius: 20px; padding: 6px 6px 6px 12px; font-size: 14px; }
.chip b { color: #e65100; }
.chip .swap { border: none; background: #ff6a00; color: #fff; border-radius: 14px; font-size: 12px; padding: 3px 8px; cursor: pointer; }
.color-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid #ccc; vertical-align: -2px; }
.palette { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; padding: 10px; background: #fafafa; border-radius: 10px; }
.palette button { display: flex; flex-direction: column; align-items: center; gap: 2px; border: none; background: none; font-size: 12px; cursor: pointer; }
.palette .dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; }
.palette button.sel .dot { border-color: #ff6a00; }
.match-line { margin-top: 10px; font-size: 14px; color: #2e7d32; background: #e8f5e9; padding: 8px 10px; border-radius: 8px; }
.fallback-link { margin-top: 10px; font-size: 14px; }
.fallback-link a { color: #ff6a00; }
.ask { margin-top: 10px; }
.ask-label { font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
.big-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.big-btns .opt { flex: 1; min-width: 70px; min-height: 48px; border: 1px solid #ddd; border-radius: 10px; background: #fff; font-size: 15px; cursor: pointer; }
.big-btns .opt.selected { border-color: #ff6a00; background: #fff3e0; color: #e65100; font-weight: 700; }
.progress { margin-top: 12px; background: #eee; border-radius: 8px; height: 26px; position: relative; overflow: hidden; }
.progress .bar { height: 100%; width: 40%; background: #ff6a00; border-radius: 8px; transition: width .5s; }
.progress span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.result-item { position: relative; border-radius: 10px; overflow: hidden; background: #eee; }
.result-item img { width: 100%; display: block; aspect-ratio: 3/4; object-fit: cover; }
.result-item .r-name { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 5px; }
.result-item .r-wm { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.45); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 5px; }
.result-item .r-dl { position: absolute; left: 6px; right: 6px; bottom: 6px; min-height: 36px; border: none; border-radius: 8px; background: rgba(255,106,0,.92); color: #fff; font-size: 14px; cursor: pointer; }
.result-item .r-dl.vip { background: rgba(0,0,0,.55); }
.result-style { font-size: 13px; color: #e65100; }
.tip { font-size: 13px; color: #888; margin-top: 10px; }
.samples { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.samples figure img { width: 100%; border-radius: 10px; display: block; aspect-ratio: 3/4; object-fit: cover; }
.samples figcaption { font-size: 13px; color: #555; margin-top: 4px; }
.plans { display: flex; flex-direction: column; gap: 10px; }
.plan { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 12px; }
.plan b { font-size: 16px; }
.plan span { color: #e65100; font-weight: 700; }
.plan button { border: none; background: #ff6a00; color: #fff; border-radius: 8px; padding: 8px 14px; font-size: 14px; cursor: pointer; }
.model-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.model-card { border: 1px solid #ddd; border-radius: 10px; padding: 10px; background: #fff; cursor: pointer; font-size: 14px; }
.model-card.selected { border-color: #ff6a00; background: #fff3e0; }
.model-card b { display: block; font-size: 15px; }
.history { padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.history .h-item { border: 1px solid #eee; border-radius: 12px; padding: 12px; background: #fff; }
.history .h-imgs { display: flex; gap: 6px; margin-top: 8px; }
.history .h-imgs img { width: 23%; border-radius: 6px; aspect-ratio: 3/4; object-fit: cover; }
footer { text-align: center; color: #aaa; font-size: 12px; padding: 20px 16px 90px; }
.bottomnav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; display: flex; background: #fff; border-top: 1px solid #eee; padding-bottom: env(safe-area-inset-bottom); z-index: 30; }
.bottomnav button { flex: 1; border: none; background: none; padding: 10px 0; font-size: 13px; color: #888; cursor: pointer; }
.bottomnav button.active { color: #ff6a00; font-weight: 700; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-box { background: #fff; border-radius: 14px; padding: 20px; width: 100%; max-width: 380px; }
.modal-box h3 { margin-bottom: 10px; }
.msg { color: #d32f2f; font-size: 13px; margin-top: 8px; min-height: 18px; }
.admin-out { background: #f5f5f5; border-radius: 8px; padding: 10px; font-size: 12px; white-space: pre-wrap; word-break: break-all; max-height: 300px; overflow: auto; margin-top: 10px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 16px; border-radius: 20px; font-size: 14px; z-index: 60; white-space: nowrap; }
