:root{--bg:#F6F7FB;--text:#111827;--muted:#6B7280;--bd:#E5E7EB;--dark:#111827}
*{box-sizing:border-box}html,body{margin:0;background:var(--bg);font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;color:var(--text)}
#app{width:390px;max-width:100vw;height:844px;max-height:100dvh;margin:0 auto;position:relative;background:var(--bg);overflow:hidden;outline:1px solid var(--bd);outline-offset:-1px;border-radius:28px}
.screen{position:absolute;inset:0;display:block}
.topbar{position:absolute;inset:0 0 auto 0;height:88px;padding:14px 12px 12px 14px;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(180deg,#F6F7FB 0%,#F6F7FB 76%,rgba(246,247,251,.75) 100%);z-index:8}
.topbar h1{font-size:16px;font-weight:900;margin:0}
.icon-btn{width:44px;height:36px;border:1px solid var(--bd);border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;color:#111827}
.icon-btn svg,.tab svg{width:18px;height:18px}
.icon-btn svg path,.icon-btn svg circle,.tab svg path,.tab svg circle{stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.avatar-dot{width:36px;height:36px;border-radius:18px;background:#111827;display:block}
.plain-right{width:44px;height:36px;display:flex;align-items:center;justify-content:center}

.content{position:absolute;left:14px;right:14px;top:92px;bottom:118px;overflow:auto;z-index:2;padding:2px 0 24px;scrollbar-width:none}
.content::-webkit-scrollbar{display:none}
.content.home,.content.my,.content.progress,.content.challenge-pre{top:92px}
.card{background:#fff;border:1px solid var(--bd);border-radius:22px;box-shadow:0 8px 20px rgba(17,24,39,.04)}
.home .chips{display:flex;gap:10px;overflow:auto;padding-bottom:2px}.chip{height:44px;border-radius:22px;border:1px solid var(--bd);background:#fff;padding:0 14px;font-size:12px;font-weight:900;white-space:nowrap}
.hero{margin-top:10px;height:170px;border-radius:26px;padding:18px 16px;position:relative;overflow:hidden;border:1px solid #E5E7EB}
.hero-accent{position:absolute;right:18px;top:18px;width:120px;height:134px;border-radius:22px;opacity:.55}
.hero-title{font-size:24px;font-weight:900;line-height:1.05;letter-spacing:-0.02em;position:relative;z-index:1}
.hero-sub{margin-top:8px;color:#6B7280;font-size:12px;font-weight:800;position:relative;z-index:1}
.list{margin-top:12px;padding:12px}.sec-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.sec-row b{font-size:14px}.sec-row span{font-size:12px;color:#6B7280;font-weight:800}
.trend{height:78px;border:1px solid var(--bd);border-radius:22px;background:#fff;padding:12px;display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.trend .dot{width:14px;height:14px;border-radius:7px;display:inline-block;margin-right:8px;vertical-align:middle}.trend button{width:64px;height:34px;border:none;border-radius:17px;background:#111827;color:#fff;font-size:12px;font-weight:900}

.challenge-pre .swatch{min-height:220px;border-radius:26px;color:#fff;padding:16px;box-shadow:0 18px 40px rgba(0,0,0,.16)}.swatch .name{font-size:28px;font-weight:900;line-height:1.02}.swatch .hex{margin-top:6px;font-size:13px;font-weight:800;opacity:.95}
.swatch .actions{margin-top:120px;display:flex;gap:10px}.swatch .actions button{flex:1;height:44px;border-radius:18px;font-size:14px;font-weight:900}.swatch .actions button:first-child{background:#ffffff24;border:1px solid #fff;color:#fff}.swatch .actions button:last-child{background:#111827;border:1px solid #111827;color:#fff}
.empty{margin-top:14px;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px}.empty .t{font-size:16px;font-weight:900}.empty .s{margin-top:8px;font-size:12px;font-weight:700;color:#6B7280;text-align:center}

.progress .progress-chip{height:64px;padding:12px;display:flex;align-items:center;gap:10px}
.sq{width:40px;height:40px;border-radius:14px}
.meta{flex:1;min-width:0}
.meta b{font-size:14px;font-weight:900;line-height:1.1}
.meta span{display:block;margin-top:6px;font-size:12px;color:#6B7280;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.small{width:86px;height:40px;border:none;border-radius:18px;background:#07142e;color:#fff;font-size:12px;font-weight:900}

.board-wrap{margin-top:12px;padding:12px}
.tip{font-size:12px;color:#6B7280;font-weight:700;margin-bottom:10px}
.board{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}
.cell{height:108px;border:none;border-radius:16px;background:#EEF2F7;position:relative;overflow:hidden}
.cell:nth-child(even){background:#F3F4F6}
.cell img{width:100%;height:100%;object-fit:cover}
.cell span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:28px;color:#111827}

.gen{margin-top:14px;width:100%;height:56px;border:none;border-radius:22px;background:#07142e;color:#fff;font-size:15px;font-weight:900}
.mini{margin-top:10px;height:44px;padding:12px 14px;display:flex;justify-content:space-between;align-items:center}
.mini b{font-size:12px;font-weight:900}
.mini span{font-size:12px;color:#6B7280;font-weight:700}

.my .profile{height:120px;padding:14px;display:flex;align-items:center;gap:12px}.avatar{width:56px;height:56px;border-radius:28px;background:#111827}.profile b{font-size:18px}.profile span{display:block;margin-top:4px;font-size:12px;color:#6B7280}
.stats{margin-top:12px;height:76px;display:grid;grid-template-columns:repeat(3,1fr)}.stats>div{display:flex;flex-direction:column;align-items:center;justify-content:center}.stats b{font-size:18px}.stats span{font-size:12px;color:#6B7280}

.tabbar{position:absolute;left:0;right:0;bottom:0;height:100px;background:#fff;border-top:1px solid var(--bd);z-index:10}
.tab{position:absolute;top:22px;width:56px;height:56px;border-radius:28px;border:1px solid var(--bd);background:#fff;color:#111827;display:flex;align-items:center;justify-content:center;box-shadow:0 1px 0 rgba(17,24,39,.03)}
.tab:nth-child(1){left:44px}.tab:nth-child(3){right:44px}
.tab.center{left:50%;transform:translateX(-50%);top:12px;width:76px;height:76px;border-radius:38px;box-shadow:0 10px 20px rgba(17,24,39,.08)}
.tab.active{background:#111827;border-color:#111827;color:#fff}

.sheet{position:absolute;inset:0;background:#0005;display:flex;align-items:flex-end;justify-content:center;padding:12px;z-index:30}.sheet.hidden{display:none}.sheet-card{width:100%;background:#fff;border-radius:28px;padding:12px;display:grid;gap:10px;box-shadow:0 16px 40px rgba(17,24,39,.18)}.sheet-card h3{margin:0;font-size:13px}.sheet-card button{height:50px;border-radius:18px;border:1px solid var(--bd);font-size:15px;font-weight:900;background:#F3F4F6}.sheet-card button:last-child{background:#fff}

.result-mask{position:absolute;inset:0;background:#F6F7FB;padding:100px 14px 110px;z-index:25}.result{height:100%;padding:12px;display:flex;flex-direction:column;gap:10px}.pv{height:520px;border-radius:18px;background:#111827;overflow:hidden}.pv img{width:100%;height:100%;object-fit:cover}.row{display:flex;gap:10px}.row button{flex:1;height:56px;border-radius:22px;font-size:14px;font-weight:900}.row button:first-child{border:none;background:#111827;color:#fff}.row button:last-child{border:1px solid var(--bd);background:#fff}.ghost{height:36px;border:none;background:transparent;color:#6B7280}

@media (max-width:390px){#app{width:100vw;height:100dvh;outline:none}}
