/* 两套皮肤共用的布局骨架；颜色、描边、阴影都在各自的 theme 里 */
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{display:flex;justify-content:center;align-items:center;-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased}
button,input,textarea{font:inherit;color:inherit;margin:0}
button{cursor:pointer;background:none;border:0;padding:0;touch-action:manipulation}
textarea,input{outline:none}
#app{position:relative;width:100%;max-width:430px;height:100vh;height:100dvh;overflow:hidden}
@media (min-width:600px) and (min-height:700px){
  #app{height:min(844px,calc(100dvh - 48px));max-width:390px;border-radius:44px}
}
.page{position:relative;height:100%;display:flex;flex-direction:column}
.nav{flex:none;height:44px;margin-top:max(env(safe-area-inset-top),8px);display:flex;align-items:center;gap:6px;padding:0 7px 0 8px}
.nav.home{padding-left:18px}
.nav-back{width:40px;height:40px;display:grid;place-items:center;flex:none}
.nav-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.capsule{width:87px;height:32px;border-radius:16px;display:flex;align-items:center;flex:none}
.cap-dots{flex:1;display:flex;justify-content:center;align-items:center;gap:3px}
.cap-dots i{width:5px;height:5px;border-radius:50%;background:currentColor}
.cap-dots i:nth-child(2){width:7px;height:7px}
.cap-sep{width:1px;height:18px;opacity:.2;background:currentColor}
.cap-ring{flex:1;display:flex;justify-content:center}
.cap-ring i{width:15px;height:15px;border-radius:50%;border:2px solid currentColor;display:grid;place-items:center}
.cap-ring i::after{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}
.scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:8px 18px 20px;display:flex;flex-direction:column;gap:14px}
.scroll::-webkit-scrollbar{display:none}
.bottom{flex:none;padding:12px 18px calc(env(safe-area-inset-bottom) + 18px)}
.bottom.row{display:flex;align-items:center;gap:14px}
.bottom.row .btn{flex:1}
.num{font-variant-numeric:tabular-nums}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 14px;font-weight:700;font-size:14px}
.btn.sm{min-height:36px;padding:0 12px;font-size:13px}
.btn.big{width:100%;height:56px;font-size:17px}
.btn.wide{width:100%}
.btn.disabled{opacity:.45}
.link{font-size:13px;text-decoration:underline;text-underline-offset:3px;min-height:44px;padding:0 4px}
.pills{display:flex;gap:8px;flex-wrap:wrap}
.pill{height:36px;padding:0 16px;font-size:14px;border-radius:18px}
.pill.sm{height:30px;padding:0 11px;font-size:13px;border-radius:15px}
.av{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:900;font-size:13px;flex:none}
.av.sm{width:24px;height:24px;font-size:11px}
/* 广场 */
.sq-list{display:flex;flex-direction:column;gap:16px}
.sq-card{display:flex;flex-direction:column;gap:10px;padding:14px}
.sq-hd{display:flex;align-items:center;gap:8px}
.sq-who{flex:1;min-width:0;font-size:14px}
.sq-body{display:flex;gap:12px;align-items:center}
.sq-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.food-tile{width:58px;height:58px;flex:none;display:grid;place-items:center}
.sq-foot{display:flex;align-items:center;gap:10px}
.dots{flex:1;display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:4px}
.dots i{display:block}
.tab-spacer{height:96px;flex:none}
.tabbar{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:space-around}
.tab{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:12px;width:80px;min-height:44px;justify-content:center}
.tab-dot{position:absolute;top:2px;right:22px;width:9px;height:9px;border-radius:50%}
.fab{display:grid;place-items:center;border-radius:50%}
.row-card,.hist-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:12px 14px}
.row-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.row-main b{font-size:15px}
.row-main small{font-size:12px}
.badge{display:inline-flex;align-items:center;white-space:nowrap;font-size:12px;font-weight:900;padding:2px 9px}
.empty{padding:28px 10px;text-align:center;font-size:14px}
.empty.sm{padding:12px}
/* 发起 */
.blk{display:flex;flex-direction:column;gap:8px}
.blk.row2{flex-direction:row;gap:10px}
.blk-hd{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.blk-hd b{font-size:16px}
.blk-hd small{font-size:12px}
.food-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.food-btn{height:44px;font-size:14px}
.portion{display:flex;align-items:center;gap:10px;padding:8px 10px;flex-wrap:wrap}
.portion-main{flex:1;min-width:120px;display:flex;flex-direction:column}
.portion-main b{font-size:16px}
.portion-main small{font-size:12px}
.seg{display:flex;overflow:hidden;font-weight:700;font-size:13px}
.seg button{padding:5px 11px;min-height:32px;white-space:nowrap}
.seg.mini button{padding:5px 8px;font-size:12px}
.fld{flex:1;display:flex;flex-direction:column;gap:6px}
.fld b{font-size:16px}
.fld small{font-size:12px;display:flex;justify-content:space-between}
.fld textarea{height:64px;resize:none;padding:8px 10px;font-size:14px;line-height:1.45}
.photo{align-self:flex-end;width:64px;height:64px;flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;font-weight:700}
.slider{display:flex;align-items:center;gap:10px;font-weight:700;font-size:13px}
.slider input{flex:1;-webkit-appearance:none;appearance:none;background:transparent;height:30px}
.slider input::-webkit-slider-thumb{-webkit-appearance:none}
.rules{padding:10px 12px;gap:8px}
.rules-hd{font-size:15px}
.rule{display:flex;align-items:center;justify-content:space-between;font-size:13px;gap:8px}
.rule.dim{opacity:.4;pointer-events:none}
.rules-note{margin:0;font-size:12px}
/* 判官 */
.j-hero{display:flex;gap:12px;align-items:center;position:relative;padding:12px 14px}
.j-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.j-who{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700}
.j-who>span:nth-child(2){flex:1}
.j-food{font-weight:900;font-size:26px;line-height:1.15}
.j-quote{padding:8px 12px;font-size:14px;line-height:1.5}
.lock,.unlock{display:flex;align-items:center;gap:10px;padding:9px 12px;font-size:13px}
.sec-title{font-weight:900;font-size:16px;margin-top:2px}
.vbtns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.vbtn{height:52px;font-weight:900;font-size:15px;transition:transform .12s,box-shadow .12s}
.quick-reasons{display:flex;gap:6px;flex-wrap:wrap;margin-top:-6px}
.qr{font-size:12px;padding:5px 9px;min-height:30px}
.alt-input{display:flex;align-items:center;gap:8px;padding:0 10px;height:44px}
.alt-input input{flex:1;min-width:0;border:0;background:transparent;font-size:14px}
.alt-tag{font-size:12px;font-weight:900;padding:1px 6px;white-space:nowrap}
.vote{display:flex;flex-direction:column;gap:6px;padding:12px}
.vote-hd{display:flex;align-items:center;gap:8px;font-size:13px}
.vote-hd b{flex:1;min-width:0}
.vote-txt{margin:0;font-size:14px;line-height:1.5}
.vote-alt{display:flex;align-items:center;gap:8px;font-size:13px}
.tally{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.tally-n{margin-left:auto;font-size:12px}
.settled{display:flex;flex-direction:column;align-items:center;padding:12px;gap:2px}
.settled b{font-size:24px}
/* 我的 */
.t-hero{display:flex;flex-direction:column;gap:8px;padding:14px 16px 16px;flex:none}
.t-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.t-food{font-size:13px;font-weight:700}
.t-clock{display:flex;align-items:baseline;gap:8px}
.t-num{font-size:64px;line-height:1;font-weight:700}
.t-after,.t-meta{font-size:13px}
.t-meta{font-size:12px}
.t-tasks{display:flex;flex-direction:column;gap:6px;padding:8px 10px;margin-top:4px}
.t-tasks b{font-size:13px}
.t-task-row{display:flex;flex-wrap:wrap;gap:6px}
.task{display:flex;align-items:center;gap:4px;font-size:12px;font-weight:700;padding:4px 9px;min-height:30px}
.t-actions{display:flex;gap:8px}
.t-actions .btn{flex:1}
.ff{font-size:12px;padding:6px;opacity:.75;text-decoration:underline;text-underline-offset:3px}
.idle-txt{margin:0;font-size:14px}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.stats div{padding:8px 10px;display:flex;flex-direction:column}
.stats b{font-size:22px}
.stats small{font-size:11px}
.filters{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.held-inline{margin-left:auto;font-size:12px}
.hist{display:flex;flex-direction:column}
/* 结果 */
.r-hero{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;padding:18px 12px}
.r-hero small{font-size:12px}
.r-stamp{font-size:34px;font-weight:900;line-height:1.2}
.page.result.fresh .r-stamp{animation:stamp .6s cubic-bezier(.2,1.6,.4,1) both}
@keyframes stamp{0%{transform:scale(2.4) rotate(-8deg);opacity:0}100%{transform:scale(1) rotate(-3deg);opacity:1}}
.cond-line{display:flex;gap:8px;align-items:flex-start;font-size:14px;line-height:1.5}
.alts{display:flex;flex-direction:column}
.alt-row{display:flex;justify-content:space-between;padding:9px 12px;font-size:14px}
.more-votes{align-self:flex-start}
.fb-btns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.btn.fb{padding:0 4px;font-size:13px}
.fb-note{margin:0;font-size:13px;text-align:center}
/* 浮层 */
.sheet-mask{position:absolute;inset:0;z-index:20;animation:fade .2s}
.sheet{position:absolute;left:0;right:0;bottom:0;z-index:21;max-height:75%;overflow-y:auto;padding:18px 18px calc(env(safe-area-inset-bottom) + 22px);display:flex;flex-direction:column;gap:10px;animation:up .25s cubic-bezier(.2,.9,.3,1)}
.sh-title{font-size:17px}
.sh-list{display:flex;flex-direction:column}
.sh-row{display:flex;align-items:center;gap:10px;min-height:48px;text-align:left;font-size:15px}
.sh-row span{flex:1}
.sh-row small{font-size:12px}
.sh-note{margin:0;font-size:13px}
.sh-btns{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@keyframes fade{from{opacity:0}}
@keyframes up{from{transform:translateY(100%)}}
.toast{position:fixed;left:50%;top:max(env(safe-area-inset-top),16px);transform:translate(-50%,-140%);z-index:50;padding:10px 16px;font-size:14px;font-weight:700;max-width:calc(100% - 40px);text-align:center;opacity:0;visibility:hidden;transition:transform .3s cubic-bezier(.2,.9,.3,1),opacity .2s,visibility .3s;pointer-events:none}
.toast.show{transform:translate(-50%,0);opacity:1;visibility:visible}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* 二期：自主输入、状态、信息卡、战绩、反馈 */
.food-input{width:100%;height:50px;padding:0 14px;font-size:16px;font-weight:700}
.blk-hd.sub{margin-top:2px}
.portion-hint{margin:0;font-size:13px;padding:6px 2px}
.kcal-in{width:64px;height:28px;padding:0 6px;font-size:13px;font-weight:700;text-align:center;-moz-appearance:textfield}
.kcal-in::-webkit-inner-spin-button,.exact input::-webkit-inner-spin-button{-webkit-appearance:none}
.status-sum{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:12px 14px}
.status-edit{font-size:13px;font-weight:700;white-space:nowrap}
.status-box{display:flex;flex-direction:column;gap:8px;padding:12px 14px}
.st-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px}
.st-row>span{flex:none}
.st-sub{font-size:12px;margin-top:2px}
.st-total{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:13px;padding-top:8px}
.exact{display:flex;align-items:center;gap:6px;font-size:12px}
.exact input{width:72px;height:30px;padding:0 8px;font-size:13px;-moz-appearance:textfield}
.status-box .link{align-self:flex-end;min-height:32px}
.info-card{display:flex;flex-direction:column;gap:10px;padding:12px 14px}
.info-hd{display:flex;align-items:center;justify-content:space-between;gap:8px}
.info-hd b{font-size:15px}
.goal-tag,.hc-lean{font-size:12px;font-weight:700;padding:2px 9px;white-space:nowrap}
.kbar{position:relative;height:16px;display:flex;overflow:visible}
.kbar i{display:block;height:100%}
.k-line{position:absolute;top:-5px;bottom:-5px;width:3px;margin-left:-1.5px}
.klegend{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:12px}
.klegend span{display:inline-flex;align-items:center;gap:5px}
.dot{display:inline-block;width:10px;height:10px;border-radius:3px;flex:none}
.dot.k-line{position:static;width:3px;height:12px;margin:0}
.kverdict{margin:0;font-size:14px;font-weight:700}
.hc-bar{display:flex;height:16px;overflow:hidden}
.hc-bar i{display:block;height:100%}
.hc-labels{display:flex;justify-content:space-between;gap:10px}
.hc-labels span{display:flex;flex-direction:column;font-size:13px}
.hc-labels span:last-child{text-align:right}
.hc-labels b{font-size:18px}
.hc-labels small{font-size:11px}
.recap summary{cursor:pointer;font-size:13px;font-weight:700;min-height:40px;display:flex;align-items:center}
.recap[open]{display:flex;flex-direction:column;gap:10px}
.record-link{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:44px;padding:0 14px;font-size:13px;text-align:left}
button.stats{width:100%;text-align:left}
.rec-hero{display:flex;flex-direction:column;align-items:center;text-align:center;gap:2px;padding:16px 14px}
.rec-hero small{font-size:12px}
.rec-rate{font-size:64px;line-height:1.05;font-weight:700}
.rec-rate span{font-size:28px}
.rec-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.rec-tile{display:flex;flex-direction:column;align-items:center;padding:10px 4px;min-height:64px}
.rec-tile b{font-size:22px}
.rec-tile small{font-size:11px;white-space:nowrap}
.rec-note{margin:0;font-size:12px;text-align:center}
.fb-card{display:flex;flex-direction:column;gap:4px;padding:14px;text-align:center}
.fb-title{font-size:18px}
.fb-card p{margin:0;font-size:13px;line-height:1.5}
.alt-pick{display:flex;flex-direction:column;gap:6px}
.alt-pick small{font-size:12px}
.alt-pick .chip{min-height:32px}
.poster-img{width:100%;max-width:300px;align-self:center;aspect-ratio:750/1180;object-fit:contain}
/* 三期：发布范围、私密单 */
.vis-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.food-btn.vis-btn{height:auto;min-height:64px;padding:8px 10px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;text-align:left}
.vis-btn b{font-size:14px}
.vis-btn small{font-size:11px;font-weight:400;line-height:1.35;opacity:.8}
.vis-note{margin:0;display:flex;align-items:flex-start;gap:6px;font-size:12px;line-height:1.5;color:var(--mute);text-align:left}
.vis-note svg{flex:none;width:16px;height:16px;margin-top:1px}
.priv-box{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;margin-top:2px}
.priv-hd{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap}
.priv-hd b{font-size:13px}
.priv-hd small{font-size:11px;color:var(--mute)}
.hist-row.viewer{padding:8px 10px}
.hist-row.viewer.removed{opacity:.5}
.priv-box .link{align-self:flex-start;min-height:32px;font-size:12px}
.blocked-hero{align-items:center;text-align:center;gap:12px;padding:28px 18px}
.blocked-ic svg{width:48px;height:48px}
.sh-row .av{flex:none}
