:root{
  --bg:#0b1020;
  --card:rgba(255,255,255,0.08);
  --card2:rgba(255,255,255,0.12);
  --text:rgba(255,255,255,0.92);
  --muted:rgba(255,255,255,0.70);
  --line:rgba(255,255,255,0.14);
  --accent:#7dd3fc;
  --accent2:#a78bfa;
  --good:#34d399;
  --warn:#fbbf24;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Noto Sans","PingFang TC","Microsoft JhengHei",sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 10% 10%, rgba(167,139,250,0.18), transparent 60%),
    radial-gradient(900px 700px at 80% 15%, rgba(125,211,252,0.16), transparent 55%),
    radial-gradient(900px 700px at 50% 90%, rgba(52,211,153,0.10), transparent 60%),
    var(--bg);
}
a{color:inherit; text-decoration:none}
.container{max-width:1100px; margin:0 auto; padding:24px 16px 48px}
.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-bottom:18px;
}
.brand{display:flex; align-items:center; gap:10px}
.logo{
  width:34px; height:34px; border-radius:10px;
  background:linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow:0 10px 30px rgba(0,0,0,0.35);
}
.brand h1{font-size:18px; margin:0}
.badge{
  padding:6px 10px; border:1px solid var(--line); border-radius:999px;
  background:rgba(0,0,0,0.18);
  color:var(--muted); font-size:12px;
}
.card{
  background:linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 22px 60px rgba(0,0,0,0.45);
  overflow:hidden;
}
.cardHeader{
  padding:18px 18px 12px;
  border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.cardHeader h2{margin:0; font-size:16px}
.cardBody{padding:18px}
.grid{
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  gap:14px;
}
.col6{grid-column:span 6}
.col5{grid-column:span 5}
.col7{grid-column:span 7}
.col12{grid-column:span 12}
@media (max-width:900px){
  .col6,.col5,.col7{grid-column:span 12}
}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(0,0,0,0.20);
  color:var(--text);
  cursor:pointer;
  user-select:none;
  transition:transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
  width:100%;
  font-weight:650;
}
.btn:hover{background:rgba(0,0,0,0.26); border-color:rgba(255,255,255,0.20)}
.btn:active{transform:translateY(1px)}
.btnPrimary{
  background:linear-gradient(135deg, rgba(125,211,252,0.25), rgba(167,139,250,0.22));
  border-color:rgba(125,211,252,0.35);
}
.btnPrimary:hover{border-color:rgba(167,139,250,0.45)}
.row{display:flex; gap:10px; flex-wrap:wrap}
.input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(0,0,0,0.20);
  color:var(--text);
  outline:none;
}
.input::placeholder{color:rgba(255,255,255,0.45)}
.help{color:var(--muted); font-size:13px; line-height:1.5}
.hr{height:1px; background:var(--line); margin:14px 0}
.kv{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:10px;
  font-size:13px;
  color:var(--muted);
}
.kv div:nth-child(odd){color:rgba(255,255,255,0.78)}
.pills{display:flex; gap:8px; flex-wrap:wrap}
.pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(0,0,0,0.18);
}
.notice{
  border:1px dashed rgba(255,255,255,0.22);
  background:rgba(0,0,0,0.18);
  border-radius:16px;
  padding:12px 12px;
  color:var(--muted);
  font-size:13px;
}
.stage{
  position:relative;
  height:min(1280px, calc(100vh - 260px));
  aspect-ratio:853 / 1280;
  width:auto;
  max-width:100%;
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(0,0,0,0.22);
  overflow:hidden;
  margin:0 auto;
}
.layer{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  pointer-events:none;
}
.stageOverlay{
  position:absolute;
  left:12px; right:12px; bottom:12px;
  display:flex; gap:10px;
}
.smallBtn{
  flex:1;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(0,0,0,0.25);
  color:var(--text);
  cursor:pointer;
  font-weight:650;
}
.smallBtn:hover{background:rgba(0,0,0,0.30)}
.table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.table th,.table td{
  padding:10px 10px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
}
.table th{color:rgba(255,255,255,0.85); font-weight:700}
.right{display:flex; align-items:center; gap:10px}
.toast{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:18px;
  background:rgba(0,0,0,0.55);
  border:1px solid rgba(255,255,255,0.18);
  color:rgba(255,255,255,0.92);
  padding:10px 12px;
  border-radius:14px;
  max-width:92vw;
  z-index:50;
  font-size:13px;
}
.hidden{display:none}

.stageFit{
  display:flex;
  justify-content:center;
}
@media (max-width:900px){
  .stage{
    width:100%;
    height:auto;
    max-width:853px;
  }
}
