:root{
  --bg0:#070A10;
  --bg1:#0B1020;
  --panel:#0f1630cc;
  --line:#1f2a4a;
  --text:#eaf1ff;
  --muted:#a8b6d4;
  --chip:#0b1226;
  --chip2:#0b1226aa;
  --blue:#2d64ff;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 20% 10%, #15255e55, transparent 60%),
    radial-gradient(900px 700px at 80% 0%, #2d64ff33, transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

.app{
  max-width:1150px;
  margin:0 auto;
  padding:18px 14px 28px;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:linear-gradient(180deg, #0f1630cc, #0b1020cc);
  backdrop-filter:blur(8px);
}

.brand{display:flex;align-items:center;gap:12px}
.logo{
  width:42px;
  height:42px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:#0b1226;
  border:1px solid var(--line);
  box-shadow:0 10px 30px #00000055;
  font-size:20px;
}
.title{font-weight:800;font-size:16px}
.subtitle{color:var(--muted);font-size:13px;margin-top:2px}

.topbar-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

.main{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin-top:14px;
}

.panel{
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--panel);
  backdrop-filter:blur(10px);
  padding:14px;
}

.panel-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.panel h2{margin:0;font-size:16px}

.dash{
  display:grid;
  grid-template-columns:1.25fr 1fr 0.85fr 1.15fr 1fr;
  gap:12px;
}
@media (max-width:1100px){
  .dash{grid-template-columns:1fr 1fr}
}
@media (max-width:680px){
  .dash{grid-template-columns:1fr}
}

.field{margin-top:12px}
label{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:6px;
}

input[type="file"], input[type="number"], select{
  width:100%;
  padding:10px 11px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#0b1226;
  color:var(--text);
  outline:none;
}

.rowControls{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.rowControls input[type="number"]{max-width:110px}

.btn{
  border:1px solid var(--line);
  background:#0b1226;
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  transition:transform .05s ease, background .15s ease;
}
.btn:hover{background:#0c1736}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn.primary{
  border-color:rgba(45,100,255,.65);
  box-shadow:0 0 0 2px rgba(45,100,255,.16) inset;
}
.btn.ghost{background:transparent}

.dot{
  width:9px;
  height:9px;
  border-radius:99px;
  display:inline-block;
  background:#556;
  margin-right:8px;
  box-shadow:0 0 0 3px rgba(255,255,255,.06);
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--chip);
  color:var(--muted);
  font-size:13px;
}
.chip.subtle{background:var(--chip2)}
.stack{display:flex;flex-direction:column;gap:8px}

.heard{
  border:1px dashed rgba(168,182,212,.35);
  padding:10px 12px;
  border-radius:14px;
  color:var(--muted);
  background:rgba(11,18,38,.45);
}
.heard span{color:var(--text)}

.hint{color:var(--muted);font-size:13px}
.small{font-size:12px}
.footer{margin-top:12px}

.seg{
  display:flex;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:#0b1226;
}
.seg-btn{
  flex:1;
  padding:10px 10px;
  border:0;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
}
.seg-btn.active{
  color:var(--text);
  background:rgba(45,100,255,.16);
  box-shadow:0 0 0 1px rgba(45,100,255,.3) inset;
}

.modalOverlay{
  position:fixed;
  inset:0;
  display:none;
  background:rgba(0,0,0,.55);
  z-index:9999;
}
.modalOverlay.open{display:block}

.modalSheet{
  position:absolute;
  inset:18px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(11,18,38,.92);
  backdrop-filter:blur(10px);
  overflow:hidden;
}

.modalGridWrap{
  position:absolute;
  inset:0;
  overflow:auto;
  padding:14px;
}

.modalFloating{
  position:absolute;
  top:14px;
  right:14px;
  width:min(560px, calc(100% - 28px));
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(11,18,38,.94);
  backdrop-filter:blur(10px);
  padding:12px;
  z-index:3;
  box-shadow:0 16px 50px rgba(0,0,0,.45);
}

.modalTitle{
  font-weight:800;
  margin-bottom:8px;
}

.modalRow{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin:8px 0;
}

.modalRow input[type="number"]{
  width:90px;
  padding:9px 10px;
}

.mini{
  font-size:12px;
  color:var(--muted);
}

.modalCloseTopLeft{
  position:absolute;
  top:12px;
  left:12px;
  z-index:5;
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(11,18,38,.92);
  color:var(--text);
  cursor:pointer;
}
.modalCloseTopLeft:hover{background:rgba(45,100,255,.12)}

.modalCursorBig{
  font-size:36px;
  font-weight:900;
  line-height:1.05;
  margin:6px 0;
}
.modalCursorBig.mono{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  letter-spacing:1px;
}

.modalSeg .seg-btn{padding:8px 10px}

.fullGrid{
  display:grid;
  grid-auto-rows:26px;
  gap:4px;
  padding-top:290px;
}

.fullCell{
  width:34px;
  height:26px;
  border-radius:10px;
  border:1px solid var(--line);
  background:rgba(11,18,38,.6);
  color:var(--text);
  cursor:pointer;
  font-size:13px;
  display:grid;
  place-items:center;
  user-select:none;
}
.fullCell:hover{
  background:rgba(45,100,255,.12);
}
.fullCell.active{
  outline:2px solid var(--blue);
  outline-offset:-2px;
  background:rgba(45,100,255,.20);
  font-size:1.2em;
  font-weight:800;
  position:relative;
  z-index:2;
  transition:font-size 80ms ease, transform 80ms ease;
}

.tinyTicker{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  background:rgba(11,18,38,.75);
  margin:10px 0 12px;
}
.tinyTickerTop{
  display:flex;
  align-items:baseline;
  gap:8px;
  margin-bottom:8px;
}
.tinyLabel{
  font-size:12px;
  color:var(--muted);
}
.tinyRC,.tinyVal{font-weight:900}
.tinySep{opacity:.55}
.tinyStrip{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
}
.tinyItem{
  min-width:36px;
  text-align:center;
  padding:6px 8px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(11,18,38,.5);
  font-size:14px;
}
.tinyCurrent{
  font-size:17px;
  font-weight:900;
  outline:2px solid var(--blue);
  outline-offset:-2px;
  background:rgba(45,100,255,.15);
}

.distBox{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  background:rgba(11,18,38,.75);
  margin:10px 0 12px;
}

.distLabel{
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}

.distText{
  font-size:13px;
  line-height:1.5;
  color:var(--text);
  word-break:break-word;
}:root{
  --bg0:#070A10;
  --bg1:#0B1020;
  --panel:#0f1630cc;
  --line:#1f2a4a;
  --text:#eaf1ff;
  --muted:#a8b6d4;
  --chip:#0b1226;
  --chip2:#0b1226aa;
  --blue:#2d64ff;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 20% 10%, #15255e55, transparent 60%),
    radial-gradient(900px 700px at 80% 0%, #2d64ff33, transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

.app{
  max-width:1150px;
  margin:0 auto;
  padding:18px 14px 28px;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:linear-gradient(180deg, #0f1630cc, #0b1020cc);
  backdrop-filter:blur(8px);
}

.brand{display:flex;align-items:center;gap:12px}
.logo{
  width:42px;
  height:42px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:#0b1226;
  border:1px solid var(--line);
  box-shadow:0 10px 30px #00000055;
  font-size:20px;
}
.title{font-weight:800;font-size:16px}
.subtitle{color:var(--muted);font-size:13px;margin-top:2px}

.topbar-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

.main{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin-top:14px;
}

.panel{
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--panel);
  backdrop-filter:blur(10px);
  padding:14px;
}

.panel-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.panel h2{margin:0;font-size:16px}

.dash{
  display:grid;
  grid-template-columns:1.25fr 1fr 0.85fr 1.15fr 1fr 1.15fr;
  gap:12px;
}
@media (max-width:1200px){
  .dash{grid-template-columns:1fr 1fr 1fr}
}
@media (max-width:900px){
  .dash{grid-template-columns:1fr 1fr}
}
@media (max-width:680px){
  .dash{grid-template-columns:1fr}
}

.field{margin-top:12px}
label{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:6px;
}

input[type="file"], input[type="number"], select{
  width:100%;
  padding:10px 11px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#0b1226;
  color:var(--text);
  outline:none;
}

.rowControls{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.rowControls input[type="number"]{max-width:110px}

.btn{
  border:1px solid var(--line);
  background:#0b1226;
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  transition:transform .05s ease, background .15s ease;
}
.btn:hover{background:#0c1736}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn.primary{
  border-color:rgba(45,100,255,.65);
  box-shadow:0 0 0 2px rgba(45,100,255,.16) inset;
}
.btn.ghost{background:transparent}

.dot{
  width:9px;
  height:9px;
  border-radius:99px;
  display:inline-block;
  background:#556;
  margin-right:8px;
  box-shadow:0 0 0 3px rgba(255,255,255,.06);
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--chip);
  color:var(--muted);
  font-size:13px;
}
.chip.subtle{background:var(--chip2)}
.stack{display:flex;flex-direction:column;gap:8px}

.heard{
  border:1px dashed rgba(168,182,212,.35);
  padding:10px 12px;
  border-radius:14px;
  color:var(--muted);
  background:rgba(11,18,38,.45);
}
.heard span{color:var(--text)}

.hint{color:var(--muted);font-size:13px}
.small{font-size:12px}
.footer{margin-top:12px}

.seg{
  display:flex;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:#0b1226;
}
.seg-btn{
  flex:1;
  padding:10px 10px;
  border:0;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
}
.seg-btn.active{
  color:var(--text);
  background:rgba(45,100,255,.16);
  box-shadow:0 0 0 1px rgba(45,100,255,.3) inset;
}

.modalOverlay{
  position:fixed;
  inset:0;
  display:none;
  background:rgba(0,0,0,.55);
  z-index:9999;
}
.modalOverlay.open{display:block}

.modalSheet{
  position:absolute;
  inset:18px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(11,18,38,.92);
  backdrop-filter:blur(10px);
  overflow:hidden;
}

.modalGridWrap{
  position:absolute;
  inset:0;
  overflow:auto;
  padding:14px;
}

.modalFloating{
  position:absolute;
  top:14px;
  right:14px;
  width:min(560px, calc(100% - 28px));
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(11,18,38,.94);
  backdrop-filter:blur(10px);
  padding:12px;
  z-index:3;
  box-shadow:0 16px 50px rgba(0,0,0,.45);
}

.modalTitle{
  font-weight:800;
  margin-bottom:8px;
}

.modalRow{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin:8px 0;
}

.modalRow input[type="number"]{
  width:90px;
  padding:9px 10px;
}

.mini{
  font-size:12px;
  color:var(--muted);
}

.modalCloseTopLeft{
  position:absolute;
  top:12px;
  left:12px;
  z-index:5;
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(11,18,38,.92);
  color:var(--text);
  cursor:pointer;
}
.modalCloseTopLeft:hover{background:rgba(45,100,255,.12)}

.modalCursorBig{
  font-size:36px;
  font-weight:900;
  line-height:1.05;
  margin:6px 0;
}
.modalCursorBig.mono{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  letter-spacing:1px;
}

.modalSeg .seg-btn{padding:8px 10px}

.fullGrid{
  display:grid;
  grid-auto-rows:26px;
  gap:4px;
  padding-top:290px;
}

.fullCell{
  width:34px;
  height:26px;
  border-radius:10px;
  border:1px solid var(--line);
  background:rgba(11,18,38,.6);
  color:var(--text);
  cursor:pointer;
  font-size:13px;
  display:grid;
  place-items:center;
  user-select:none;
}
.fullCell:hover{
  background:rgba(45,100,255,.12);
}
.fullCell.active{
  outline:2px solid var(--blue);
  outline-offset:-2px;
  background:rgba(45,100,255,.20);
  font-size:1.2em;
  font-weight:800;
  position:relative;
  z-index:2;
  transition:font-size 80ms ease, transform 80ms ease;
}

.tinyTicker{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  background:rgba(11,18,38,.75);
  margin:10px 0 12px;
}
.tinyTickerTop{
  display:flex;
  align-items:baseline;
  gap:8px;
  margin-bottom:8px;
}
.tinyLabel{
  font-size:12px;
  color:var(--muted);
}
.tinyRC,.tinyVal{font-weight:900}
.tinySep{opacity:.55}
.tinyStrip{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
}
.tinyItem{
  min-width:36px;
  text-align:center;
  padding:6px 8px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(11,18,38,.5);
  font-size:14px;
}
.tinyCurrent{
  font-size:17px;
  font-weight:900;
  outline:2px solid var(--blue);
  outline-offset:-2px;
  background:rgba(45,100,255,.15);
}

.distBox{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  background:rgba(11,18,38,.75);
  margin:10px 0 12px;
}

.distLabel{
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}

.distText{
  font-size:13px;
  line-height:1.5;
  color:var(--text);
  word-break:break-word;
}