*{box-sizing:border-box}

:root{
  --bg:#0b0f14;
  --panel:#111826;
  --panel2:#0f1723;
  --line:#1f2a3a;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --accent:#60a5fa;
  --ok:#34d399;
  --warn:#f59e0b;
}

html,body{height:100%}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Noto Sans KR,Apple SD Gothic Neo,Helvetica,Arial,sans-serif;
  background:linear-gradient(180deg,var(--bg),#06080c);
  color:var(--text);
}

.topBanner{
  width:100%;
  display:flex;
  justify-content:center;
  padding:10px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(11,15,20,.72);
}

.topBannerLink{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

.topBannerLink img{
  height:75px;
  width:auto;
  max-width:100%;
  display:block;
}

.top{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(10px);
  background:rgba(11,15,20,.72);
  border-bottom:1px solid var(--line);
  height:75px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
}

.topInner{
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding:0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo{
  width:auto;
  height:auto;
  border-radius:0;
  background:none;
  display:block;
}

.logo img{
  width:75px;
  height:75px;
  display:block;
}

.brandText{
  display:flex;
  flex-direction:column;
  justify-content:center;
  line-height:1.2;
  margin-left:30px;
  margin-top:15px;
}

h1{
  margin:0;
  font-size:16px;
  letter-spacing:-.2px;
}

.sub{
  margin:2px 0 0;
  color:var(--muted);
  font-size:12px;
}

.actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.wrap{
  max-width:1200px;
  margin:0 auto;
  padding:18px;
}

.panel{
  background:linear-gradient(180deg,var(--panel),var(--panel2));
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  margin-bottom:14px;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
}

.panel h2{
  margin:0 0 12px;
  font-size:15px;
  color:#dbeafe;
}

.btn{
  border:1px solid var(--line);
  background:#0b1220;
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:600;
  height:44px;
  display:flex;
  align-items:center;
}

.btn:hover{border-color:#2b3a52}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn.primary{background:linear-gradient(135deg,#2563eb,#0ea5e9);border-color:transparent}

.xmlNameGroup{
  display:flex;
  align-items:center;
  gap:8px;
}

.xmlNameInput{
  width:160px;
  max-width:35vw;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#070b12;
  color:var(--text);
  outline:none;
  font-weight:650;
  height:44px;
  display:flex;
  align-items:center;
}

.xmlNameInput::placeholder{color:var(--muted)}
.xmlNameInput:focus{border-color:#2E54E2;box-shadow:0 0 0 3px rgba(46,84,226,.18)}

.dropzone{
  position:relative;
  border:3px solid #2E54E2;
  border-radius:16px;
  padding:24px;
  min-height:160px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:rgba(46,84,226,.06);
  transition:background .2s ease,border-color .2s ease;
}

.dropzone.drag{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(96,165,250,.18) inset;
}

#fileInput{
  width:220px;
  max-width:45vw;
}

.dzTitle{font-weight:800}
.dzHint{color:var(--muted);font-size:12px;margin-top:4px}

.previewRow{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:14px;
  margin-top:14px;
}

.preview{
  margin:0;
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  background:#070b12;
}

.preview img{
  width:100%;
  display:block;
  max-height:380px;
  object-fit:contain;
  background:#070b12;
}

.preview figcaption{
  padding:10px 12px;
  color:var(--muted);
  font-size:12px;
  border-top:1px solid var(--line);
}

.settings{
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
  background:rgba(0,0,0,.10);
}

.settings h3{
  margin:0 0 10px;
  font-size:13px;
  color:#e0f2fe;
}

.field{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 6px;
  border-top:1px solid rgba(31,42,58,.65);
}

.field:first-of-type{border-top:none}

.field label{
  color:#cbd5e1;
  font-weight:650;
  font-size:13px;
}

.pill{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  font-size:12px;
  color:var(--muted);
}

.pill.on{
  color:#e5e7eb;
  background:rgba(96,165,250,.10);
  border-color:rgba(96,165,250,.28);
}

.reExtractWrap{
  margin-top:16px;
  display:flex;
  justify-content:flex-end;
}

.reExtractWrap .btn{
  padding:14px 20px;
  font-size:14px;
  font-weight:900;
}

.sets{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}

.setCard{
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  background:rgba(0,0,0,.10);
}

.setHead{
  padding:12px 12px 10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid var(--line);
}

.setTitle{font-weight:900}

.setDesc{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}

.tag{
  font-size:11px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(96,165,250,.28);
  background:rgba(96,165,250,.10);
  color:#dbeafe;
  white-space:nowrap;
}

.colors{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px;
  padding:12px;
}

.swatch{
  border:1px solid rgba(31,42,58,.8);
  border-radius:14px;
  overflow:hidden;
  background:#0b1220;
  cursor:pointer;
}

.swatchTop{height:44px}

.swatchMeta{
  padding:10px 10px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.role{
  font-size:12px;
  color:#cbd5e1;
  font-weight:700;
}

.hex{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  font-size:12px;
  color:#e5e7eb;
}

.smallBtn{
  border:1px solid var(--line);
  border-radius:10px;
  padding:6px 8px;
  font-size:12px;
  background:#0b1220;
  color:#e5e7eb;
  cursor:pointer;
}

.smallBtn:hover{border-color:#2b3a52}

.setFoot{
  padding:10px 12px;
  border-top:1px solid var(--line);
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:center;
}

.selectRow{display:flex;gap:8px;align-items:center}

.radio{
  display:flex;
  gap:8px;
  align-items:center;
  color:#cbd5e1;
  font-size:12px;
}

.radioLabel{
  font-size:24px;
  font-weight:900;
  color:#e5e7eb;
  letter-spacing:-0.2px;
}

.xmlBox{
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
}

.xmlTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-bottom:1px solid var(--line);
}

.hint{color:var(--muted);font-size:12px}

.xmlPreview{
  margin:0;
  padding:12px;
  max-height:340px;
  overflow:auto;
  background:#070b12;
  color:#e5e7eb;
  font-size:12px;
  line-height:1.55;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
}

.xmlBottomRow{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  width:100%;
}

.foot{margin-top:10px}

.note{
  color:var(--muted);
  font-size:12px;
  padding:8px 2px;
}

.copyright{
  margin-top:10px;
  padding:6px 2px;
  font-size:11px;
  line-height:1.5;
  color:#6b7280;
}

.bottomBanner{
  border-top:1px solid var(--line);
  border-bottom:none;
  margin-top:18px;
}

.hidden{display:none}

@media (max-width:980px){
  .previewRow{grid-template-columns:1fr}
  .sets{grid-template-columns:1fr}
}

@media (max-width:520px){
  .topBanner{padding:8px 12px}
  .topBannerLink img{height:60px}
  .reExtractWrap{justify-content:stretch}
  .reExtractWrap .btn{width:100%;text-align:center}
  .brandText{margin-left:12px;margin-top:8px}
  .dropzone{flex-direction:column;align-items:flex-start}
}
@media (max-width:520px){
  .brandText{
    transform: scale(0.7);
    transform-origin: left center;
  }
}