* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; padding: 26px 18px 60px;
  background: #0f1115; color: #e6e9ef;
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}
.shell { max-width: 980px; margin: 0 auto; }
h1 { font-size: 22px; margin: 0 0 6px; }
.sub { color: #8b93a7; font-size: 14px; margin: 0 0 20px; }
.sub b { color: #35c46b; }
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-bottom: 14px; }
.langbar {
  display: inline-flex; background: #171a21;
  border: 1px solid #262b36; border-radius: 9px; overflow: hidden;
}
.langbar .lang-label {
  display: inline-flex; align-items: center;
  padding: 0 4px 0 12px; font-size: 12px; color: #5d6577;
}
.langbar a.lang-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; font-size: 13px;
  color: #8b93a7; text-decoration: none; transition: .15s;
}
.langbar a.lang-link + a.lang-link { border-left: 1px solid #262b36; }
.langbar a.lang-link:hover { color: #e6e9ef; background: #1c2230; }
.langbar a.lang-link.on { background: #232a38; color: #e6e9ef; font-weight: 600; }
.tabs { display: flex; gap: 12px; margin-bottom: 16px; }
.tab {
  flex: 1; text-align: left; background: #171a21; border: 1px solid #262b36;
  border-radius: 12px; padding: 13px 17px; color: #8b93a7;
  font: inherit; font-weight: 600; cursor: pointer; transition: .15s;
}
.tab:hover:not(:disabled) { color: #e6e9ef; }
.tab.on { background: #1c2637; border-color: #4f8cff; color: #e6e9ef; }
.tab span { display: block; font-weight: 400; font-size: 12px; color: #6b7488; margin-top: 3px; }
.tab.on span { color: #8b93a7; }
.tab:disabled { opacity: .45; cursor: not-allowed; }
.card {
  background: #171a21; border: 1px solid #262b36;
  border-radius: 12px; padding: 18px; margin-bottom: 16px;
}
.card:last-child { margin-bottom: 0; }
.card.err { border-color: #4a2020; background: #1b1414; color: #ff9b9b; }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field > span { display: block; font-size: 13px; color: #8b93a7; margin-bottom: 7px; }
input[type=file] {
  width: 100%; color: #e6e9ef; font: inherit;
  background: #0d1017; border: 1px solid #262b36; border-radius: 8px; padding: 10px;
}
input[type=number], select {
  width: 100%; font: inherit; padding: 10px;
  background: #0d1017; color: #e6e9ef;
  border: 1px solid #262b36; border-radius: 8px;
}
input:disabled, select:disabled { opacity: .5; cursor: not-allowed; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.check {
  display: flex; align-items: center; gap: 8px; margin-top: 13px;
  font-size: 12.5px; color: #8b93a7; cursor: pointer;
}
.check input { width: 15px; height: 15px; accent-color: #4f8cff; }
.check:has(input:disabled) { opacity: .5; cursor: not-allowed; }
button {
  width: 100%; font: inherit; font-weight: 600; cursor: pointer;
  background: #4f8cff; color: #fff; border: 0;
  border-radius: 9px; padding: 12px;
}
button:disabled { opacity: .45; cursor: not-allowed; }
button.ghost { background: #232a38; color: #e6e9ef; }
button.mini {
  width: auto; padding: 4px 11px; font-size: 12px; font-weight: 500;
  background: #232a38; color: #e6e9ef; border-radius: 6px;
}
button.tiny { width: auto; padding: 7px 12px; font-size: 12px; font-weight: 500; }
.drop {
  display: block; border: 1.5px dashed #2e3644; border-radius: 12px;
  padding: 28px 18px; text-align: center; color: #8b93a7;
  background: #0d1017; cursor: pointer; transition: .15s;
}
.drop:hover, .drop.over { border-color: #4f8cff; color: #e6e9ef; }
.drop b { display: block; color: #e6e9ef; font-size: 15.5px; font-weight: 600; margin-bottom: 5px; }
.drop small { font-size: 12px; color: #6b7488; }
.qfile { display: flex; align-items: center; gap: 13px; margin-top: 15px; }
.qfile img {
  width: 54px; height: 54px; object-fit: cover;
  border-radius: 8px; border: 1px solid #262b36; background: #0d1017;
}
.qfile .m { flex: 1; min-width: 0; font-size: 12.5px; color: #8b93a7; }
.qfile .m b {
  display: block; color: #e6e9ef; font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.qtarget {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  flex-wrap: wrap; padding: 20px 0 2px; font-size: 15px;
}
.qtarget input[type=number] { width: 116px; text-align: right; font-size: 16px; font-weight: 600; padding: 9px 11px; }
.qtarget select { width: auto; }
.qtarget .x { color: #6b7488; }
.qnote { text-align: center; font-size: 12.5px; color: #6b7488; margin: 12px 0 0; }
.qnote b { color: #8b93a7; }
#quickNoteText { display: block; min-height: 1.2em; }
.qswitch {
  width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 11px; padding: 7px 15px; font-size: 12.5px; font-weight: 500;
  background: #1c2230; color: #9fc0ff;
  border: 1px solid #2e3644; border-radius: 99px;
  transition: background-color .15s, color .15s, border-color .15s;
}
.qswitch:hover:not(:disabled) { background: #232a38; color: #e6e9ef; border-color: #4f8cff; }
.lockbtn {
  width: auto; min-width: 86px; text-align: center;
  padding: 9px 14px; font-size: 12.5px; font-weight: 500;
  background: #232a38; color: #8b93a7; border-radius: 8px;
  box-shadow: inset 0 0 0 1px #2e3644;
  transition: background-color .15s, color .15s;
}
.lockbtn:hover:not(:disabled) { color: #e6e9ef; }
.lockbtn.on { background: #1c2637; color: #e6e9ef; box-shadow: inset 0 0 0 1px #4f8cff; }
button.big { padding: 15px; font-size: 16px; margin-top: 16px; }
.taskline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.taskline .lab { font-size: 13px; color: #8b93a7; }
.taskbar { display: inline-flex; background: #0d1017; border: 1px solid #262b36; border-radius: 9px; overflow: hidden; }
.taskbar button {
  width: auto; background: transparent; color: #8b93a7;
  border-radius: 0; padding: 8px 14px; font-size: 13px; font-weight: 500;
}
.taskbar button + button { border-left: 1px solid #262b36; }
.taskbar button.on { background: #232a38; color: #e6e9ef; }
.taskrow {
  display: none; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 14.5px; margin-bottom: 6px;
}
.taskrow input[type=number] { width: 108px; text-align: right; font-weight: 600; }
.taskrow select { width: auto; }
.taskrow .x { color: #6b7488; }
body[data-task="bytes"] .only-bytes.taskrow,
body[data-task="convert"] .only-convert.taskrow,
body[data-task="both"] .only-both.taskrow,
body[data-task="meta"] .only-meta.taskrow,
body[data-task="trim"] .only-trim.taskrow { display: flex; }
details.more { border-top: 1px solid #262b36; margin-top: 15px; padding-top: 12px; }
details.more summary { cursor: pointer; color: #8b93a7; font-size: 13px; outline: none; }
details.more[open] summary { margin-bottom: 14px; }
.bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 15px 0 13px; }
.bar .sum { flex: 1; min-width: 170px; font-size: 12.5px; color: #8b93a7; font-variant-numeric: tabular-nums; }
.bar .sum b { color: #e6e9ef; }
.bar button { width: auto; padding: 9px 15px; font-size: 13px; }
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
table.batch { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.batch th {
  text-align: left; font-weight: 500; font-size: 11.5px;
  color: #6b7488; padding: 0 9px 7px; border-bottom: 1px solid #262b36;
  white-space: nowrap;
}
table.batch td { padding: 6px 9px; border-bottom: 1px solid #1e222b; white-space: nowrap; }
table.batch tr:last-child td { border-bottom: 0; }
td.fname { max-width: 210px; overflow: hidden; text-overflow: ellipsis; color: #e6e9ef; }
td.num { text-align: right; font-variant-numeric: tabular-nums; color: #8b93a7; }
tr.done td.num.new { color: #35c46b; font-weight: 700; }
tr.done td.num.new.warn { color: #e0a32e; }
td.res { font-size: 12px; color: #6b7488; }
td.res.ok { color: #35c46b; }
td.res.warn { color: #e0a32e; }
td.res.err { color: #ff6b6b; white-space: normal; }
tr.working td.res { color: #4f8cff; }
td.act { text-align: right; }
td.cfg { white-space: nowrap; font-size: 12px; color: #8b93a7; }
input.mini-num {
  width: 58px; padding: 3px 7px; font-size: 12px;
  background: #0d1017; border: 1px solid #2e3644; border-radius: 6px;
  color: #e6e9ef; text-align: right;
}
tr.customized td.cfg { box-shadow: inset 2px 0 0 #4f8cff; }
.empty { padding: 26px 10px; text-align: center; color: #6b7488; font-size: 13px; }
.msg { font-size: 12.5px; margin: 10px 0 0; }
.msg.err { color: #ff6b6b; }
.msg.dim { color: #8b93a7; }
.msg.ok { color: #35c46b; }
.stats { display: grid; gap: 8px; font-variant-numeric: tabular-nums; }
.stats div { display: flex; justify-content: space-between; gap: 12px; }
.stats .k { color: #8b93a7; }
.stats .v { text-align: right; }
.big { font-size: 17px; font-weight: 600; }
.ok { color: #35c46b; }
.warn { color: #e0a32e; }
.err { color: #ff6b6b; }
img.preview {
  max-width: 100%; max-height: 260px; display: block;
  margin: 16px auto 0; border-radius: 8px; background: #0d1017;
}
a.dl {
  display: block; text-align: center; margin-top: 16px;
  background: #232a38; color: #e6e9ef; text-decoration: none;
  border-radius: 9px; padding: 12px; font-weight: 600;
}
.meta-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 1000;
}
.meta-card {
  background: #171a21; border: 1px solid #262b36;
  border-radius: 12px; padding: 22px;
  max-width: 580px; width: 100%;
  max-height: 90vh; overflow-y: auto;
}
.meta-card h3 { margin: 0 0 6px; font-size: 18px; color: #e6e9ef; }
.meta-card p.dim { margin: 0 0 18px; color: #8b93a7; font-size: 13px; }
.meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px;
}
.meta-grid label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #8b93a7;
}
.meta-grid input {
  width: 100%; padding: 9px 11px;
  background: #0d1017; color: #e6e9ef;
  border: 1px solid #262b36; border-radius: 8px; font: inherit;
}
.meta-cover {
  display: flex; gap: 14px; align-items: center;
  margin-bottom: 18px; padding: 14px;
  background: #0d1017; border: 1px solid #262b36; border-radius: 10px;
}
.cover-box {
  width: 110px; height: 110px; flex-shrink: 0;
  border: 1.5px dashed #2e3644; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #0d1017;
  color: #6b7488; font-size: 12px;
}
.cover-box img { width: 100%; height: 100%; object-fit: cover; }
.cover-btns { flex: 1; }
.cover-btns button { margin-right: 8px; margin-bottom: 6px; width: auto; }
.cover-btns .small { font-size: 12px; margin: 6px 0 0; color: #6b7488; }
.meta-actions {
  display: flex; justify-content: flex-end; gap: 10px;
}
.meta-actions button { width: auto; padding: 10px 18px; }
.doc {
  margin-top: 36px; padding-top: 28px;
  border-top: 1px solid #262b36;
  color: #b8c0d0; font-size: 14.5px; line-height: 1.8;
}
.doc h2 { font-size: 17px; color: #e6e9ef; margin: 28px 0 10px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 14.5px; color: #e6e9ef; margin: 18px 0 6px; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc b, .doc strong { color: #e6e9ef; }
.doc .faq {
  background: #171a21; border: 1px solid #262b36;
  border-radius: 12px; padding: 2px 18px; margin-top: 14px;
}
.doc .faq h3 { margin-top: 17px; }
.doc .faq h3 + p { margin-bottom: 17px; }
footer {
  margin-top: 30px; padding: 18px 0;
  border-top: 1px solid #262b36;
  color: #6b7488; font-size: 12px; text-align: center;
}
footer a { color: #8b93a7; text-decoration: none; }
footer a:hover { color: #e6e9ef; }
@media (max-width: 680px) {
  .tabs { flex-direction: column; }
  .row3 { grid-template-columns: 1fr; }
  .tab { padding: 11px 14px; }
  .qtarget { font-size: 14px; }
  .bar { gap: 7px; }
  .bar button { padding: 8px 11px; }
  .meta-grid { grid-template-columns: 1fr; }
  .meta-cover { flex-direction: column; align-items: flex-start; }
}
