:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #202d42;
  background: #f5f7fa;
  font-synthesis: none;
  --ink: #202d42;
  --muted: #64758b;
  --line: #dce3ed;
  --blue: #365fda;
  --surface: #fff;
  --radius: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; font-size: 1rem; line-height: 1.5; }
button, input { font: inherit; }
button { cursor: pointer; }
button, input, canvas { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid #4477ed; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.topbar { background: #14243a; color: #fff; }
.topbar-inner { max-width: 1264px; height: 65px; padding: 0 42px; display: flex; align-items: center; margin: 0 auto; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.19rem; font-weight: 700; letter-spacing: .025em; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #4674f1; box-shadow: inset 0 1px 0 #7d9afb; }
.brand-mark svg { width: 31px; height: 31px; }
.top-context { display: flex; align-items: center; align-self: stretch; color: #d9e4f5; gap: 32px; }
.top-context::before { content: ""; width: 1px; height: 23px; background: #37475d; }
.top-context span { height: 100%; display: flex; align-items: center; position: relative; white-space: nowrap; font-size: .88rem; font-weight: 550; letter-spacing: .01em; }
.top-context span::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: #7598ff; border-radius: 2px 2px 0 0; }
.local-status { margin-left: auto; color: #c5d2e2; display: flex; align-items: center; gap: 7px; font-size: .82rem; white-space: nowrap; }
.local-status .icon { width: 16px; height: 16px; stroke: #9ad8c5; }
.workspace { max-width: 1264px; margin: 0 auto; padding: 37px 42px 44px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
h1 { font-size: clamp(1.72rem, 2.4vw, 2.13rem); line-height: 1.35; letter-spacing: -.045em; font-weight: 730; color: #18263b; }
.page-heading p { margin-top: 6px; color: #627186; font-size: .97rem; }
.button, .icon-btn { border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: .9rem; line-height: 1.25; font-weight: 570; border-radius: 7px; min-height: 40px; padding: 9px 15px; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, color .15s; }
.button .icon { width: 17px; height: 17px; }
.button-subtle, .button-secondary, .small-btn { background: white; border-color: #d7dfea; color: #34445b; }
.button-subtle { background: transparent; border-color: #d6dfe9; min-height: 35px; padding: 7px 12px; font-size: .86rem; }
.button-subtle .icon { width: 16px; height: 16px; color: #62738b; }
.button-subtle:hover, .button-secondary:hover, .small-btn:hover { border-color: #a1b4d8; background: #f5f8fe; }
.button-primary { color: white; border-color: #385fe0; background: #3d66e5; box-shadow: 0 1px 2px #1b42a31a; }
.button-primary:hover { background: #3158cf; }
.button-primary:active { background: #2b4db7; }
.button-primary:disabled { color: #faffff; background: #899fd2; border-color: #899fd2; box-shadow: none; }
.button-secondary:disabled { color: #8996a8; background: #f9fafc; border-color: #e1e6ed; }

.drop-zone { display: flex; align-items: center; gap: 23px; position: relative; min-height: 146px; padding: 22px 33px 22px 26px; background: #eef4ff; border: 1.5px dashed #a6bdf1; border-radius: var(--radius); transition: border-color .17s, background .17s, box-shadow .17s; }
.drop-zone.is-dragging { background: #e4edff; border-color: #436deb; box-shadow: inset 0 0 0 2px #d5e2ff; }
.upload-art { height: 83px; width: 90px; display: grid; place-items: center; flex: none; position: relative; }
.upload-art svg { display: block; width: 89px; height: 79px; filter: drop-shadow(0 4px 3px rgb(43 83 151 / 7%)); }
.drop-copy { min-width: 0; }
.drop-copy h2 { font-size: 1.2rem; line-height: 1.4; font-weight: 680; letter-spacing: -.02em; color: #263754; }
.drop-copy p { margin-top: 5px; color: #61748e; font-size: .91rem; }
.extension { font-family: "Inter", ui-monospace, monospace; font-size: .9em; color: #4f6383; }
.drop-zone .button { margin-left: auto; padding-inline: 18px; min-height: 41px; }
.work-panels { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); align-items: stretch; gap: 20px; margin: 22px 0; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); background: white; border-radius: var(--radius); box-shadow: 0 1px 2px #273d5c05; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 58px; padding: 12px 21px; border-bottom: 1px solid #e4e9f0; }
.panel-heading h2 { display: inline-flex; align-items: center; gap: 9px; font-size: 1.04rem; font-weight: 680; letter-spacing: -.025em; white-space: nowrap; }
.panel-heading h2>.icon { color: #546b8e; width: 18px; height: 18px; stroke-width: 1.8; }
.queue-count { color: #5c6d84; background: #edf1f6; font-family: Inter, system-ui, sans-serif; display: inline-grid; place-items: center; min-width: 24px; padding: 1px 6px; border-radius: 5px; font-size: .76rem; font-weight: 600; line-height: 1.45; }
.text-btn { border: 0; background: transparent; color: #65778c; font-size: .83rem; font-weight: 470; min-height: 29px; border-radius: 5px; padding: 4px 2px 4px 6px; gap: 5px; }
.text-btn .icon { width: 15px; height: 15px; }
.text-btn:hover:not(:disabled) { color: #a13c39; background: #fff5f4; }
.text-btn:disabled { color: #99a5b4; }
.queue-panel { display: flex; flex-direction: column; }
.queue-empty { min-height: 230px; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 22px 14px 29px; }
.queue-empty-art { width: 72px; height: 63px; margin-bottom: 10px; }
.queue-empty h3 { color: #47586f; font-size: .96rem; font-weight: 600; }
.queue-empty p { color: #748296; font-size: .85rem; margin-top: 4px; }
.queue-list { padding: 0; list-style: none; margin: 0; max-height: 465px; overflow-y: auto; scrollbar-width: thin; }
.queue-list:empty { display: none; }
.queue-row { display: flex; align-items: center; position: relative; min-height: 66px; margin: 0; gap: 8px; padding: 10px 14px 10px 18px; border-bottom: 1px solid #e9edf3; }
.queue-row:last-child { border-bottom-color: transparent; }
.queue-row.is-active, .queue-row[aria-selected="true"] { background: #eef4ff; }
.queue-row.is-active::before, .queue-row[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #5178e8; }
.row-select { min-width: 0; flex: 1; align-self: stretch; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--ink); text-align: left; padding: 0; border-radius: 5px; }
.file-symbol { display: inline-grid; place-items: center; flex-shrink: 0; width: 36px; height: 40px; border-radius: 6px; font-size: .67rem; line-height: 1; font-weight: 700; color: #456ad1; background: #eaf0fc; }
.file-symbol svg { width: 20px; height: 20px; }
.file-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; gap: 4px; }
.file-name { display: block; width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .89rem; font-weight: 570; }
.file-detail { display: block; font-size: .78rem; color: #67778c; overflow-wrap: anywhere; }
.file-detail.status-error { color: #a2423c; }
.file-detail.status-review { color: #84641d; }
.small-btn:disabled { color: #98a5b6; border-color: #e1e6ee; background: #f8f9fb; }
.row-actions { display: flex; gap: 2px; align-items: center; }
.icon-btn { border: 0; width: 31px; height: 31px; min-height: 31px; padding: 5px; background: transparent; color: #61738e; }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:disabled { color: #aeb8c5; }
.icon-btn:hover:not(:disabled) { background: #e8edf5; color: #2c51ae; }
.preview-meta { color: #6a7b91; font-size: .78rem; text-align: right; }
.preview-body { padding: 15px; }
.preview-surface { position: relative; min-height: 218px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 15px; border: 1px solid #e1e7ef; border-radius: 7px; background-color: #f7f9fc; background-image: conic-gradient(#edf1f6 25%, transparent 0 50%, #edf1f6 0 75%, transparent 0); background-position: 0 0; background-size: 16px 16px; }
.preview-empty { display: flex; flex-direction: column; align-items: center; }
.preview-empty p { color: #687b94; margin-top: 1px; font-size: .85rem; font-weight: 520; }
.label-placeholder { width: 137px; height: 88px; }
#previewCanvas { display: block; max-width: 100%; max-height: 330px; height: auto; object-fit: contain; box-shadow: 0 2px 9px #213c6024; background: white; }
.preview-tools { padding: 13px 2px 1px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.preview-identity { overflow-wrap: anywhere; color: #52627a; width: 100%; font-size: .81rem; }
.preview-identity:empty { display: none; }
.preview-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.small-btn { font-size: .79rem; padding: 5px 8px; min-height: 30px; border-radius: 5px; font-weight: 500; gap: 4px; }
.small-btn .icon { width: 14px; height: 14px; }
.approve-btn { color: #2c58b9; border-color: #b3c8f4; }
.dimensions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: #63728a; font-size: .78rem; }
.dimensions label { display: inline-flex; align-items: center; gap: 4px; }
.dimension-title { font-weight: 580; color: #475971; margin-right: 2px; }
.dimensions input { width: 63px; padding: 4px; height: 29px; color: #263957; background: white; border: 1px solid #cfd9e7; border-radius: 5px; }
.preview-warning { border-radius: 6px; border: 1px solid #ead6aa; background: #fff9ec; color: #7c5c18; padding: 8px 10px; font-size: .82rem; line-height: 1.55; margin-top: 10px; }

.export-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-height: 82px; padding: 17px 21px; box-shadow: 0 1px 2px #273d5c05; }
.export-info { display: flex; align-items: center; gap: 12px; }
.export-icon { display: grid; place-items: center; color: #476cca; background: #eef3fc; width: 37px; height: 37px; border-radius: 8px; }
.export-icon .icon { width: 19px; height: 19px; }
.export-info h2 { color: #293950; font-size: .99rem; font-weight: 650; }
.export-info p { font-size: .8rem; margin-top: 2px; color: #6b7b90; }
.export-buttons { display: flex; align-items: center; gap: 9px; }
.export-buttons .button { min-height: 38px; }
dialog { width: min(455px, calc(100% - 32px)); padding: 0; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 16px 65px #10284935; border-radius: 12px; }
dialog::backdrop { background: #17294170; }
.dialog-header { padding: 17px 21px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 1.1rem; }
.dialog-body { padding: 21px; }
.dialog-body h3 { font-size: .98rem; font-weight: 650; margin-bottom: 4px; }
.dialog-body p { font-size: .9rem; line-height: 1.7; color: #52647b; }
.dialog-body h3:not(:first-child) { margin-top: 17px; }
.dialog-body p.help-note { margin-top: 19px; font-size: .82rem; background: #f0f5ff; color: #3d5c92; padding: 9px 11px; border-radius: 6px; }
.live-status { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 6; max-width: min(90vw, 560px); padding: 9px 16px; border-radius: 7px; background: #1e3049; color: white; font-size: .9rem; box-shadow: 0 4px 15px #19325030; pointer-events: none; }
.live-status:empty { display: none; }
@media (min-width: 1500px) { .workspace { padding-top: 46px; } .preview-surface { min-height: 247px; } }
@media (max-width: 850px) {
  .workspace { padding: 28px 22px 36px; }
  .topbar-inner { padding: 0 22px; }
  .work-panels { gap: 13px; grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr); }
  .panel-heading { padding-inline: 15px; }
  .preview-body { padding: 10px; }
  .drop-zone { padding: 15px 24px 15px 15px; gap: 15px; min-height: 127px; }
  .preview-surface { min-height: 206px; }
}
@media (max-width: 660px) {
  .topbar-inner { height: 58px; gap: 17px; }
  .top-context { gap: 17px; }
  .brand { gap: 8px; font-size: 1.05rem; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-mark svg { width: 27px; }
  .top-context span, .local-status { font-size: .77rem; }
  .workspace { padding: 23px 16px 28px; }
  .topbar-inner { padding: 0 16px; }
  .page-heading { align-items: flex-start; gap: 9px; margin-bottom: 17px; }
  h1 { font-size: 1.62rem; }
  .page-heading p { font-size: .86rem; max-width: 29em; margin-top: 4px; }
  .button-subtle { font-size: .79rem; padding: 5px 8px; min-height: 31px; }
  .button-subtle .icon { width: 14px; height: 14px; }
  .work-panels { grid-template-columns: minmax(0,1fr); margin-block: 15px; }
  .queue-empty { min-height: 150px; padding: 16px 12px; }
  .queue-empty-art { width: 51px; height: 44px; margin-bottom: 4px; }
  .panel-heading { min-height: 48px; padding: 8px 15px; }
  .preview-body { padding: 10px; }
  .preview-surface { min-height: 195px; }
  .export-bar { flex-wrap: wrap; gap: 13px; padding: 14px; }
  .export-buttons { margin-left: auto; }
}
@media (max-width: 460px) {
  .drop-zone { padding: 13px 15px; min-height: 112px; display: grid; grid-template-columns: 49px minmax(0, 1fr); gap: 5px 12px; }
  .upload-art { grid-row: 1 / 3; align-self: center; width: 49px; height: 58px; }
  .upload-art svg { width: 57px; height: 57px; }
  .drop-copy h2 { font-size: 1rem; }
  .drop-copy p { font-size: .8rem; margin-top: 2px; }
  .drop-zone .button { justify-self: start; margin: 4px 0 0; min-height: 31px; padding: 6px 10px; font-size: .8rem; }
  .export-buttons { width: 100%; }
  .export-buttons .button { flex: 1; min-height: 35px; font-size: .82rem; padding-inline: 8px; }
  .topbar-inner { gap: 12px; }
  .top-context { gap: 12px; }
  .local-status { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { transition: none !important; } }
