:root{
  --color-bg-page:#f8f8ff;
  --color-bg-card:#ffffff;
  --color-text-main:#1a1a2e;
  --color-text-muted:#6b7280;
  --color-red:#e63946;
  --color-gold:#f59e0b;
  --color-blue:#00b4d8;
  --color-purple:#7c3aed;
  --color-orange:#ea580c;
  --color-border:#e5e7eb;
  --max-width:390px;
  --font-scale:1.2;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", Arial, sans-serif;
  background:var(--color-bg-page);
  color:var(--color-text-main);
}

.appShell{
  height:100dvh;
  display:flex;
  justify-content:center;
}
.appFrame{
  width:100%;
  max-width:var(--max-width);
  height:100dvh;
  display:flex;
  flex-direction:column;
  position:relative;
}

.header{
  position:sticky;
  top:0;
  z-index:20;
  background:var(--color-bg-card);
  border-bottom:2px solid var(--color-red);
  padding:10px 12px 8px;
}
.brandRow{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:0;
}
.brandSubRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:4px;
}
.brandTitle{
  font-weight:800;
  font-size:calc(16px * var(--font-scale));
  line-height:1.1;
}
.brandTitle .em{color:var(--color-red)}
.subTitle{
  margin-top:0;
  flex:1;
  min-width:0;
  font-size:calc(11px * var(--font-scale));
  color:var(--color-text-muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.loginUserName{
  min-height:28px;
  max-width:128px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  font-size:calc(12px * var(--font-scale));
  font-weight:700;
  color:#374151;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.loginUserNameOnLine{
  flex-shrink:0;
  min-height:20px;
  max-width:160px;
  font-size:calc(12px * var(--font-scale));
  font-weight:700;
  color:#374151;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.loginRequired{
  min-height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  background:var(--color-bg-page);
}
.loginRequiredCard{
  width:min(360px, 100%);
  background:var(--color-bg-card);
  border:1px solid var(--color-border);
  border-radius:12px;
  padding:24px 16px;
  text-align:center;
}
.loginRequiredTitle{
  font-size:calc(18px * var(--font-scale));
  font-weight:900;
  color:var(--color-red);
}

.coverBanner{
  margin:8px 10px 0;
  border-radius:12px;
  overflow:hidden;
  aspect-ratio:16/6;
  max-height:35vh;
  background:linear-gradient(135deg, #eff9ff, #e9d5ff);
}
.coverBanner.fallback{
  background:
    radial-gradient(120% 120% at 0% 0%, #dbeafe 0%, transparent 45%),
    radial-gradient(120% 120% at 100% 100%, #fce7f3 0%, transparent 50%),
    linear-gradient(135deg, #eef2ff, #f8fafc);
}
.coverBannerImg{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.doublePill{
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:var(--color-red);
  color:#fff;
  font-weight:800;
  font-size:11px;
  white-space:nowrap;
}
.blinkDot{
  width:8px;height:8px;border-radius:999px;background:#fff;opacity:.9;
  animation: blink 1.1s infinite;
}
@keyframes blink{
  0%,100%{transform:scale(.85); opacity:.45}
  50%{transform:scale(1.2); opacity:1}
}

.main{
  flex:1;
  min-height:0;
  overflow:auto;
  padding:10px 10px 74px;
}

.loadingState{
  margin-top:10px;
  background:#fff;
  border:1px solid var(--color-border);
  border-radius:12px;
  min-height:180px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.loadingSpinner{
  width:28px;
  height:28px;
  border:3px solid #e5e7eb;
  border-top-color:var(--color-blue);
  border-radius:999px;
  animation: spin .9s linear infinite;
}
.loadingText{
  font-size:calc(12px * var(--font-scale));
  color:var(--color-text-muted);
  font-weight:700;
}
@keyframes spin{
  to { transform: rotate(360deg); }
}

.tabBar{
  position:sticky;
  bottom:0;
  z-index:30;
  background:var(--color-bg-page);
  border-top:1px solid #e8e7f0;
}
.tabRow{
  display:grid;
  grid-template-columns:1fr 1fr;
}
.tabBtn{
  border:none;
  background:transparent;
  padding:11px 8px;
  font-weight:700;
  font-size:calc(12px * var(--font-scale));
  color:#9ca3af;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}
.tabBtn.active{
  background:var(--color-bg-card);
  color:var(--color-red);
  border-top:2.5px solid var(--color-red);
}

.card{
  background:var(--color-bg-card);
  border:1px solid var(--color-border);
  border-radius:12px;
  overflow:hidden;
}
.pillSwitch{
  display:flex;
  gap:8px;
  margin:8px 0 10px;
}
.pill{
  flex:1;
  border-radius:999px;
  border:1px solid #e0dfd8;
  background:#fff;
  padding:8px 10px;
  font-weight:800;
  font-size:calc(12px * var(--font-scale));
  color:#9ca3af;
  cursor:pointer;
  transition:transform 0.08s ease, filter 0.08s ease;
}
.pill:active{
  transform:scale(0.96);
  filter:brightness(0.92);
}
.pill.activeTaste{
  background:#eff9ff;
  border-color:var(--color-blue);
  color:#0077a8;
}
.pill.activeSales{
  background:#fffbef;
  border-color:var(--color-gold);
  color:#b45309;
}

.boardHead{
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-weight:800;
  font-size:calc(12px * var(--font-scale));
}
.boardHead.taste{
  background:#eff9ff;
  border-bottom:1px solid #bae6fd;
  color:#0077a8;
}
.boardHead.sales{
  background:#fffbef;
  border-bottom:1px solid #fde68a;
  color:#b45309;
}
.boardTotal{
  font-size:calc(11px * var(--font-scale));
  color:var(--color-text-muted);
  font-weight:700;
}

.rows{display:flex; flex-direction:column;}
.row{
  display:grid;
  grid-template-columns: 30px 38px 1fr 70px;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-bottom:1px solid #f1f1f5;
}
.row:last-child{border-bottom:none}
.rank{
  font-weight:900;
  font-size:calc(12px * var(--font-scale));
  color:#d1d5db;
}
.rank.r1{color:var(--color-gold)}
.rank.r2{color:var(--color-text-muted)}
.rank.r3{color:var(--color-orange)}
.rank.rank--first{
  display:flex;
  align-items:center;
  gap:3px;
  line-height:1;
}
.rankCrown{
  display:block;
  flex-shrink:0;
  color:inherit;
}

.row.r1{
  position:relative;
  z-index:1;
  background:#fffbef;
  grid-template-columns:42px 38px 1fr 70px;
  box-shadow:
    0 0 0 1px rgba(251,191,36,0.22),
    0 0 14px rgba(245,158,11,0.2),
    0 0 26px rgba(251,191,36,0.12);
}
.row.r2{background:#fafafa}
.row.r3{background:#fff5f0}

.row.row--self{
  background:linear-gradient(90deg, rgba(59,130,246,0.12), rgba(251,191,36,0.1));
  border-left:3px solid var(--color-blue);
  box-shadow:inset 0 0 0 1px rgba(59,130,246,0.25);
}
.row.r1.row--self{
  box-shadow:
    inset 0 0 0 1px rgba(59,130,246,0.25),
    0 0 0 1px rgba(251,191,36,0.28),
    0 0 16px rgba(245,158,11,0.22),
    0 0 30px rgba(251,191,36,0.14);
}

.card.card--rankingList{
  position:relative;
  max-height:min(70vh, calc(100vh - 220px));
  overflow-y:auto;
  display:flex;
  flex-direction:column;
}

.rankSelfBar{
  position:sticky;
  bottom:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:10px 12px;
  margin-top:auto;
  font-weight:800;
  font-size:calc(12px * var(--font-scale));
  color:#1f2937;
  background:rgba(255,255,255,0.92);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border-top:1px solid var(--color-border);
  box-shadow:0 -4px 12px rgba(15,23,42,0.06);
}
.rankSelfBarLabel{color:#6b7280;font-weight:700}
.rankSelfBarValue{color:var(--color-red);font-weight:900}
.rankSelfBar .blinkDot{background:var(--color-gold)}

.avatar{
  width:34px;height:34px;border-radius:999px;
  display:flex;align-items:center;justify-content:center;
  font-weight:800;font-size:11px;
  border:1px solid var(--color-border);
  color:#9ca3af;
  background:#f9fafb;
  flex-shrink:0;
}
.avatar.avatar--initial{
  background:var(--av-bg, #f9fafb);
  color:var(--av-fg, #374151);
  border:1px solid rgba(31,41,55,0.12);
  font-size:calc(10px * var(--font-scale));
  letter-spacing:-0.02em;
}
@keyframes rankGlow{
  0%,100%{
    box-shadow:0 0 0 2px rgba(251,191,36,0.55),0 0 6px rgba(245,158,11,0.25);
  }
  50%{
    box-shadow:0 0 0 3px rgba(251,191,36,0.95),0 0 14px rgba(245,158,11,0.45);
  }
}
.avatar.avatar--initial.a1{
  animation:rankGlow 2s ease-in-out infinite;
}
.avatar.avatar--initial.a2{box-shadow:0 0 0 2px #9ca3af}
.avatar.avatar--initial.a3{box-shadow:0 0 0 2px #fb923c}

.row.row--skeleton{
  pointer-events:none;
  border-bottom-color:#f1f1f5;
}
.row.row--skeleton .rank.skRank{
  font-size:0;
  line-height:0;
  color:transparent;
}
.row.row--skeleton .skRank{
  width:22px;height:14px;border-radius:4px;
  background:linear-gradient(90deg,#ececf0 0%,#f6f6f8 50%,#ececf0 100%);
  background-size:200% 100%;
  animation:skShimmer 1.1s ease-in-out infinite;
}
.avatar.avatar--skeleton{
  background:#ececf0;
  border-color:#e5e7eb;
  animation:skShimmer 1.1s ease-in-out infinite;
  background-size:200% 100%;
  background-image:linear-gradient(90deg,#ececf0 0%,#f6f6f8 45%,#ececf0 90%);
}
.skCol{min-width:0;flex:1;display:flex;flex-direction:column;gap:6px;}
.skLine{
  height:10px;border-radius:4px;
  background:linear-gradient(90deg,#ececf0 0%,#f6f6f8 50%,#ececf0 100%);
  background-size:200% 100%;
  animation:skShimmer 1.1s ease-in-out infinite;
}
.skLine--lg{width:72%}
.skLine--sm{width:42%;height:8px}
.skBar{
  height:5px;border-radius:3px;margin-top:2px;
  background:#eef0f4;
  overflow:hidden;
}
.skBar::after{
  content:"";
  display:block;height:100%;width:45%;
  background:#e2e5eb;border-radius:3px;
}
.skVal{
  width:36px;height:14px;border-radius:4px;
  background:linear-gradient(90deg,#ececf0 0%,#f6f6f8 50%,#ececf0 100%);
  background-size:200% 100%;
  animation:skShimmer 1.1s ease-in-out infinite;
  justify-self:end;
}
@keyframes skShimmer{
  0%{background-position:100% 0}
  100%{background-position:-100% 0}
}

.rows.rows--fadeIn{
  animation:rowsFadeIn 0.45s ease-out forwards;
}
.rows.rows--skeletonWrap{
  animation:none;
}
@keyframes rowsFadeIn{
  from{opacity:0}
  to{opacity:1}
}

.name{
  font-weight:800;
  font-size:calc(12px * var(--font-scale));
  line-height:1.2;
}
.sub{
  margin-top:2px;
  font-size:calc(10px * var(--font-scale));
  color:var(--color-text-muted);
}
.bar{
  height:5px;border-radius:3px;background:#f3f4f6;overflow:hidden;margin-top:6px;
}
.bar > div{height:100%}
.bar.taste > div{background:var(--color-blue)}
.bar.sales > div{background:var(--color-gold)}

.value{
  text-align:right;
  font-weight:900;
  font-size:calc(13px * var(--font-scale));
  color:#1f2937;
}

.expandBtn{
  width:100%;
  border:none;
  background:#fff5f5;
  color:var(--color-red);
  font-weight:800;
  font-size:calc(12px * var(--font-scale));
  padding:12px 12px;
  cursor:pointer;
  transition:transform 0.08s ease, filter 0.08s ease;
}
.expandBtn:active{
  transform:scale(0.96);
  filter:brightness(0.92);
}

.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.statCard{
  border-radius:10px;
  padding:10px 10px 9px;
  border:1.5px solid var(--color-border);
}
.statCard .tag{
  font-size:calc(8px * var(--font-scale));
  font-weight:700;
  letter-spacing:.06em;
}
.statCard .statUnit{
  margin-top:3px;
  font-size:calc(9px * var(--font-scale));
  font-weight:600;
  color:var(--color-text-muted);
}
.statTaste .statUnit{color:#0e7490}
.statSales .statUnit{color:#b45309}
.statCard .num{
  margin-top:6px;
  font-size:calc(20px * var(--font-scale));
  font-weight:900;
}
.statCard .num.numPop{
  animation:numPopScale 0.45s ease-out;
}
@keyframes numPopScale{
  0%{transform:scale(1)}
  45%{transform:scale(1.12)}
  100%{transform:scale(1)}
}
.statCard .hint{
  margin-top:4px;
  font-size:calc(10px * var(--font-scale));
  color:var(--color-text-muted);
}
.statTaste{background:#eff9ff;border-color:#bae6fd}
.statTaste .tag,.statTaste .num{color:#0077a8}
.statSales{background:#fffbef;border-color:#fde68a}
.statSales .tag{color:#b45309}
.statSales .num{color:var(--color-gold)}

/* ── 新段位卡片 tierCard2 ── */
@keyframes tierPulse{0%,100%{opacity:.5}50%{opacity:1}}
@keyframes tierBarIn{from{width:0}to{width:var(--tw,0%)}}
@keyframes tierShimmer{0%{transform:translateX(-100%)}100%{transform:translateX(400%)}}

.tierCard2{
  position:relative;
  margin-top:10px;
  background:#fff;
  border:1px solid var(--color-border);
  border-radius:12px;
  padding:14px;
  overflow:hidden;
}
.tierHelpBtn{
  position:absolute;
  top:10px;
  right:10px;
  z-index:2;
  width:22px;
  height:22px;
  padding:0;
  border-radius:50%;
  border:1px solid #d1d5db;
  background:#fff;
  color:#6b7280;
  font-weight:900;
  font-size:calc(10px * var(--font-scale));
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 1px 2px rgba(15,23,42,0.06);
}
.tierHelpBtn:active{transform:scale(0.96)}
.tierTop{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
  padding-right:30px;
}
.tierBadge{
  width:50px;
  height:50px;
  border-radius:50%;
  border:2px solid;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  line-height:1;
  flex-shrink:0;
}
.tierInfo{flex:1;min-width:0}
.tierName{
  font-weight:800;
  font-size:calc(13px * var(--font-scale));
  color:var(--color-text-main);
  margin-bottom:3px;
}
.tierPts{
  font-size:calc(10px * var(--font-scale));
  color:var(--color-text-muted);
}
.tierBarLabels{
  display:flex;
  justify-content:space-between;
  font-size:calc(10px * var(--font-scale));
  margin-bottom:5px;
}
.tierBarTrack{
  height:10px;
  border-radius:999px;
  overflow:hidden;
  position:relative;
}
.tierBarFill{
  height:100%;
  border-radius:999px;
  position:relative;
  animation:tierBarIn .8s cubic-bezier(.22,1,.36,1) both .1s;
}
.tierBarFill::after{
  content:'';
  position:absolute;
  inset:0;
  width:40%;
  background:rgba(255,255,255,.4);
  animation:tierShimmer 2.4s ease-in-out infinite 1s;
}
.tierMilestone{
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:10px;
  padding:8px 12px;
  border-radius:8px;
}
.tierMilestoneDot{
  width:7px;
  height:7px;
  border-radius:50%;
  flex-shrink:0;
  animation:tierPulse 1.5s ease-in-out infinite;
}
.tierMilestoneText{
  font-size:calc(10px * var(--font-scale));
  font-weight:800;
}
@media(prefers-reduced-motion:reduce){
  .tierBarFill{animation:none;width:var(--tw,0%)}
  .tierBarFill::after{animation:none}
  .tierMilestoneDot{animation:none;opacity:1}
}


.uploadTabs{display:flex; gap:8px; margin-top:12px;}
.uploadTab{
  flex:1;
  border-radius:999px;
  border:1px solid #e0dfd8;
  background:#fff;
  padding:8px 10px;
  font-weight:800;
  font-size:calc(12px * var(--font-scale));
  color:#9ca3af;
  cursor:pointer;
  transition:transform 0.08s ease, filter 0.08s ease;
}
.uploadTab:active{
  transform:scale(0.96);
  filter:brightness(0.92);
}
.uploadTab.active{color:var(--color-red); border-color:var(--color-red); background:#fff5f5;}

.form{
  margin-top:10px;
  background:#fff;
  border:1px solid #ede9fe;
  border-radius:12px;
  padding:10px;
}

.uploadAlert{
  display:block;
  position:relative;
  margin-bottom:10px;
  padding:10px 40px 10px 12px;
  border-radius:10px;
  border-left:4px solid var(--color-text-muted);
  background:#f9fafb;
  font-size:calc(12px * var(--font-scale));
  line-height:1.45;
}
.uploadAlert--hidden{display:none!important}
.uploadAlert--error{
  border-left-color:var(--color-red);
  background:#fef2f2;
}
.uploadAlert--warning{
  border-left-color:var(--color-gold);
  background:#fffbeb;
}
.uploadAlert--success{
  border-left-color:#059669;
  background:#ecfdf5;
}
.uploadAlert--info{
  border-left-color:var(--color-blue);
  background:#eff6ff;
}
.uploadAlertTitle{
  font-weight:800;
  color:#111827;
  margin-bottom:6px;
  padding-right:4px;
}
.uploadAlertList{
  margin:0;
  padding-left:1.15em;
  color:#374151;
}
.uploadAlertList li{margin-top:4px; word-break:break-word}
.uploadAlertDismiss{
  position:absolute;
  top:6px;
  right:6px;
  margin:0;
  padding:4px 8px;
  border:none;
  border-radius:6px;
  background:rgba(255,255,255,.85);
  color:#6b7280;
  font-size:calc(11px * var(--font-scale));
  font-weight:700;
  cursor:pointer;
}
.uploadAlertDismiss:active{opacity:.85}

.field{margin-bottom:8px}
.label{
  font-size:calc(11px * var(--font-scale));
  font-weight:800;
  margin-bottom:4px;
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:2px;
  color:#1f2937;
}
.requiredMark{
  color:var(--color-red);
  font-weight:900;
  line-height:1;
}
.input, .select{
  width:100%;
  height:36px;
  background:#f8f8ff;
  border:1px solid #e0dff8;
  border-radius:7px;
  padding:0 10px;
  font-size:calc(11px * var(--font-scale));
  color:#1f2937;
}
.input.input--readonly{
  background:#f3f4f6;
  border-color:#e5e7eb;
  color:#111827;
}
.fieldHint{
  margin-top:6px;
  font-size:calc(10px * var(--font-scale));
  color:var(--color-text-muted);
  font-weight:700;
}
.drop{
  position:relative;
  display:block;
  border:1.5px dashed #c7d2fe;
  background:#f8f8ff;
  border-radius:8px;
  padding:10px;
  text-align:center;
  cursor:pointer;
  overflow:hidden;
}
.dropFileInputNative{
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:100%;
  margin:0;
  opacity:0;
  cursor:pointer;
  z-index:2;
  font-size:0;
}
.dropContent{
  position:relative;
  z-index:1;
  pointer-events:none;
}
.drop .main{
  padding:0;
  overflow:visible;
}
.drop .icon{font-size:18px}
.drop .txt{margin-top:4px;color:#6366f1;font-weight:700;font-size:calc(12px * var(--font-scale))}
.drop .sub{margin-top:2px;color:#9ca3af;font-size:calc(10px * var(--font-scale))}

.filePickPanel{
  margin-top:10px;
  padding-top:8px;
  border-top:1px dashed #c7d2fe;
  text-align:left;
}
.dropFileStatus{
  font-size:calc(12px * var(--font-scale));
  font-weight:800;
  color:#4338ca;
  margin-bottom:6px;
}
.drop.hasFiles .dropFileStatus{color:#1e40af}
.dropFileList{
  margin:0;
  padding-left:1.2em;
  font-size:calc(11px * var(--font-scale));
  color:#374151;
  line-height:1.45;
}
.dropFileList li{
  margin-top:4px;
  word-break:break-word;
}
.drop.hasFiles{
  padding-bottom:12px;
}

.cta{
  width:100%;
  height:44px;
  border:none;
  border-radius:8px;
  background:var(--color-red);
  color:#fff;
  font-weight:800;
  font-size:calc(13px * var(--font-scale));
  cursor:pointer;
  transition:transform 0.08s ease, filter 0.08s ease;
}
.cta:not(:disabled):active{
  transform:scale(0.96);
  filter:brightness(0.92);
}
.cta:disabled{opacity:.6; cursor:not-allowed}
.cta.cta--busy{
  position:relative;
  padding-left:36px;
  white-space:nowrap;
}
.cta.cta--busy::before{
  content:"";
  position:absolute;
  left:14px;
  top:50%;
  width:16px;
  height:16px;
  margin-top:-8px;
  border:2px solid rgba(255,255,255,0.35);
  border-top-color:#fff;
  border-radius:50%;
  animation:uploadCtaSpin 0.7s linear infinite;
}
@keyframes uploadCtaSpin{
  to{transform:rotate(360deg)}
}

.uploadProgressPanel{
  margin-top:12px;
  margin-bottom:12px;
  padding:12px 12px 10px;
  background:#f8fafc;
  border:1px solid var(--color-border);
  border-radius:10px;
}
.uploadProgressPanel--hidden{display:none!important}
.uploadProgressStatus{
  font-size:calc(12px * var(--font-scale));
  font-weight:700;
  color:#334155;
  margin-bottom:8px;
}
.uploadProgressBarTrack{
  height:8px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
  position:relative;
}
.uploadProgressBarFill{
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--color-blue), #6366f1);
  transition:width 0.15s ease-out;
}
.uploadProgressBarTrack--indeterminate .uploadProgressBarFill,
.uploadProgressBarFill--indeterminate{
  background:linear-gradient(90deg, #38bdf8, #818cf8, #38bdf8);
  background-size:200% 100%;
  animation:uploadBarShimmer 1.15s linear infinite;
}
@keyframes uploadBarShimmer{
  0%{background-position:0% 50%}
  100%{background-position:200% 50%}
}

.uploadFileList{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.uploadFileRow{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:calc(11px * var(--font-scale));
  line-height:1.35;
  min-height:26px;
}
.uploadFileRow__idx{
  flex:0 0 auto;
  font-weight:800;
  color:#64748b;
  width:2em;
}
.uploadFileRow__name{
  flex:1;
  min-width:0;
  color:#1e293b;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.uploadFileRow__badge{
  flex:0 0 auto;
  font-size:calc(10px * var(--font-scale));
  font-weight:800;
  padding:2px 8px;
  border-radius:999px;
  line-height:1.3;
}
.uploadFileRow__badge--pending{
  color:#94a3b8;
  background:#f1f5f9;
}
.uploadFileRow__badge--encoding{
  position:relative;
  min-width:22px;
  min-height:18px;
  padding:0;
  background:transparent;
}
.uploadFileRow__badge--encoding::after{
  content:"";
  display:inline-block;
  width:14px;
  height:14px;
  margin:2px 0 0 4px;
  border:2px solid #cbd5e1;
  border-top-color:var(--color-red);
  border-radius:50%;
  vertical-align:middle;
  animation:uploadRowSpin 0.65s linear infinite;
}
@keyframes uploadRowSpin{
  to{transform:rotate(360deg)}
}
.uploadFileRow__badge--encoded{
  color:#0369a1;
  background:#e0f2fe;
}
.uploadFileRow__badge--ok{
  color:#15803d;
  background:#dcfce7;
}
.uploadFileRow__badge--fail{
  color:#b91c1c;
  background:#fee2e2;
}

.tierGuideOverlay{
  position:fixed;
  inset:0;
  z-index:10000;
  background:rgba(15,23,42,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  animation:tierFadeIn 0.25s ease-out;
}
.tierGuideCard{
  max-width:360px;
  width:100%;
  background:var(--color-bg-card);
  border-radius:14px;
  padding:20px 18px 16px;
  border:1px solid var(--color-border);
  box-shadow:0 20px 50px rgba(0,0,0,0.2);
}
.tierGuideTitle{
  font-weight:900;
  font-size:calc(16px * var(--font-scale));
  color:#111827;
  margin-bottom:14px;
  text-align:center;
}
.tierGuideTable{
  width:100%;
  border-collapse:collapse;
  font-size:calc(12px * var(--font-scale));
  margin-bottom:16px;
}
.tierGuideTable th,
.tierGuideTable td{
  border:1px solid var(--color-border);
  padding:8px 10px;
  text-align:left;
}
.tierGuideTable th{
  background:#f9fafb;
  font-weight:800;
  color:#374151;
}
.tierGuideTable td{color:#1f2937}
.tierGuideCloseBtn{
  width:100%;
  height:42px;
  border:none;
  border-radius:10px;
  background:var(--color-red);
  color:#fff;
  font-weight:800;
  font-size:calc(13px * var(--font-scale));
  cursor:pointer;
}

.tierCelebrateOverlay{
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(15,23,42,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  animation:tierFadeIn 0.25s ease-out;
}
@keyframes tierFadeIn{
  from{opacity:0}
  to{opacity:1}
}
.tierCelebrateCanvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
}
.tierCelebrateCard{
  position:relative;
  z-index:1;
  max-width:340px;
  width:100%;
  background:var(--color-bg-card);
  border-radius:16px;
  padding:28px 22px 22px;
  text-align:center;
  border:1px solid var(--color-border);
  box-shadow:0 20px 50px rgba(0,0,0,0.2);
}
.tierCelebrateSub{
  font-size:calc(13px * var(--font-scale));
  font-weight:800;
  color:var(--color-red);
  margin-bottom:8px;
}
.tierCelebrateTitle{
  font-size:calc(26px * var(--font-scale));
  font-weight:900;
  color:#111827;
  line-height:1.25;
  margin-bottom:20px;
}
.tierCelebrateBtn{
  width:100%;
  height:46px;
  border:none;
  border-radius:10px;
  background:var(--color-red);
  color:#fff;
  font-weight:800;
  font-size:calc(14px * var(--font-scale));
  cursor:pointer;
}

.toast{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:70px;
  background:#111827;
  color:#fff;
  padding:10px 12px;
  border-radius:10px;
  max-width:360px;
  width:calc(100% - 24px);
  font-size:calc(12px * var(--font-scale));
  z-index:50;
  display:none;
}
.toast.show{display:block}