.table{
  width:100%;
  border-collapse:collapse;
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}
.subtle{
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}
.mono{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  font-size:12px;
  white-space:pre-wrap;
  word-break:break-word;
}
.k{
  display:inline-block;
  padding:2px 8px;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgb(248,250,252);
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}
.progressline{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:10px;
}
progress{
  width:100%;
  height:12px;
  max-width:520px;
}
details.box > summary{
  cursor:pointer;
  font-weight:900;
  color:var(--text);
  list-style:none;
  outline:none;
}
details.box > summary::-webkit-details-marker{ display:none; }
details.box > summary:after{
  content:" (click)";
  color:var(--muted);
  font-weight:800;
  font-size:12px;
}

.app-panel{
  overflow:hidden;
}
.app-grid{
  align-items:start;
}
.compact-top{
  margin:12px 0 0;
}
.compact-box{
  margin-top:14px;
}

.dropzone{
  display:grid;
  place-items:center;
  gap:8px;
  padding:22px 16px;
  border:2px dashed var(--border);
  border-radius:18px;
  background:rgba(2,6,23,.015);
  text-align:center;
  cursor:pointer;
  transition:border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.dropzone:hover,
.dropzone.drag-over{
  border-color:rgba(255,215,0,.7);
  background:rgba(255,215,0,.06);
  transform:translateY(-1px);
}
.dropzone input{ display:none; }
.dropzone-title{
  font-size:18px;
  font-weight:900;
  color:var(--text);
}
.dropzone-subtitle{
  color:var(--muted);
  font-size:13px;
}
.summary-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.settings-box summary{
  margin-bottom:0;
}
.settings-stack{
  display:grid;
  gap:14px;
  margin-top:14px;
}
.check-row{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:14px;
  color:var(--text);
}
.check-row input{
  margin-top:2px;
}
.field{
  display:grid;
  gap:6px;
}
.field > span{
  font-size:13px;
  font-weight:800;
  color:var(--text);
}
.field input[type="number"],
.field input[type="text"]{
  width:100%;
  border:1px solid var(--border);
  border-radius:12px;
  padding:11px 12px;
  font-size:14px;
  color:var(--text);
  background:#fff;
}
.field input:disabled,
.check-row input:disabled{
  opacity:.6;
  cursor:not-allowed;
}
.quality-value-wrap{
  display:flex;
  gap:10px;
  align-items:center;
}
.quality-value-wrap input[type="range"]{
  flex:1;
}
.stephead-secondary{
  margin-top:16px;
}
.format-actions{
  display:grid;
  gap:10px;
}
.format-btn{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  text-align:left;
  padding:14px 16px;
}
.format-btn-main{
  font-weight:900;
}
.format-btn-note{
  font-size:12px;
  color:var(--muted);
}
.output-tools .btnbar{
  margin-top:0;
}
.status-row{
  margin-top:14px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(2,6,23,.02);
  color:var(--text);
  font-size:14px;
}
.status-success{
  background:rgba(22,163,74,.08);
  border-color:rgba(22,163,74,.18);
}
.status-error{
  background:rgba(220,38,38,.07);
  border-color:rgba(220,38,38,.16);
}
.log-box{
  margin:18px 22px 0;
  background:rgba(2,6,23,.01);
}
.log-actions{
  margin-top:10px;
}
.log-output{
  margin-top:10px;
  max-height:180px;
  overflow:auto;
  color:var(--muted);
}

.batch-list{
  display:grid;
  gap:12px;
  margin-top:12px;
}
.placeholder-card{
  padding:18px;
  border:1px dashed var(--border);
  border-radius:16px;
  color:var(--muted);
  text-align:center;
}
.batch-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:12px;
  border:1px solid var(--border);
  border-radius:18px;
  padding:12px;
  background:#fff;
}
.batch-pane{
  min-width:0;
  border:1px solid rgba(2,6,23,.08);
  border-radius:16px;
  padding:10px;
  background:rgba(248,250,252,.65);
}
.batch-pane-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.batch-pane-title h4{
  margin:0;
  font-size:14px;
  color:var(--text);
}
.badge-soft{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  background:rgba(255,215,0,.14);
  color:var(--text);
  font-size:11px;
  font-weight:800;
}
.preview-row{
  display:grid;
  grid-template-columns:96px minmax(0,1fr);
  gap:10px;
  align-items:start;
}
.preview-thumb{
  width:96px;
  height:96px;
  border-radius:12px;
  overflow:hidden;
  border:1px solid rgba(2,6,23,.08);
  background:#fff;
  display:grid;
  place-items:center;
}
.preview-button{
  display:block;
  width:100%;
  height:100%;
  padding:0;
  border:0;
  background:#fff;
  cursor:zoom-in;
}
.preview-image{
  width:100%;
  height:100%;
  object-fit:cover;
}
.meta-stack{
  min-width:0;
  display:grid;
  gap:6px;
}
.fileline{
  display:grid;
  gap:4px;
}
.filename{
  font-size:14px;
  font-weight:900;
  color:var(--text);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.filename.muted{
  color:var(--muted);
}
.meta-mini{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.result-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:4px;
}
.error-note{
  color:#b91c1c;
  font-size:13px;
  line-height:1.45;
}
.vertical-on-mobile{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.lightbox{
  position:fixed;
  inset:0;
  z-index:1000;
}
.lightbox[hidden]{
  display:none;
}
.lightbox-backdrop{
  position:absolute;
  inset:0;
  border:0;
  background:rgba(2,6,23,.82);
}
.lightbox-dialog{
  position:relative;
  z-index:1;
  width:min(1000px, calc(100% - 24px));
  max-height:calc(100dvh - 24px);
  margin:12px auto;
  background:#fff;
  border-radius:22px;
  padding:16px;
  display:grid;
  gap:12px;
  box-shadow:0 30px 80px rgba(0,0,0,.35);
}
.lightbox-close{
  position:absolute;
  top:10px;
  right:10px;
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-size:28px;
  line-height:1;
  cursor:pointer;
}
.lightbox-media-wrap{
  display:grid;
  place-items:center;
  min-height:240px;
  max-height:calc(100dvh - 140px);
  overflow:auto;
}
.lightbox-image{
  max-width:100%;
  max-height:calc(100dvh - 170px);
  object-fit:contain;
}
.lightbox-meta{
  padding-right:48px;
}

@media (max-width: 980px){
  .batch-card{
    grid-template-columns:1fr;
  }
}

@media (max-width: 720px){
  .preview-row{
    grid-template-columns:78px minmax(0,1fr);
  }
  .preview-thumb{
    width:78px;
    height:78px;
  }
  .format-btn{
    align-items:flex-start;
    flex-direction:column;
  }
  .vertical-on-mobile{
    flex-direction:column;
  }
  .vertical-on-mobile .btn{
    width:100%;
  }
  .log-box{
    margin:16px 16px 0;
  }
}
