:root {
  font-family: system-ui, -apple-system, "Noto Sans TC", "PingFang TC", sans-serif;
  color: #25243a;
  background: #f8f8fb;
  font-synthesis: none;
  --ink: #25243a;
  --muted: #686579;
  --purple: #5443b9;
  --purple-dark: #443397;
  --purple-soft: #eeebfb;
  --panel: #ffffff;
  --line: #e6e5ef;
  --warning-bg: #fff9ed;
  --warning-line: #efd9a8;
}

* { box-sizing: border-box; }

.candidate-warning {
  display: grid;
  gap: .25rem;
  padding: .75rem max(1rem, calc((100% - 1120px) / 2));
  color: #4a3512;
  background: #fff4d6;
  border-bottom: 1px solid #e8c978;
  font-size: .875rem;
  line-height: 1.5;
}

.candidate-warning strong { font-weight: 800; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 0; overflow-x: hidden; }
button, input, select { font: inherit; }
a { color: var(--purple); }

header { background: #fff; border-bottom: 1px solid #e7e6ef; }
.head { max-width: 980px; margin: auto; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.logo { color: var(--ink); text-decoration: none; font-weight: 850; letter-spacing: -.02em; }
.privacy { flex: none; color: #5c5780; font-size: 12px; }
.tool-nav { max-width: 980px; margin: 0 auto; padding: 0 20px 10px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; white-space: nowrap; }
.tool-nav a, .suite-status { flex: none; display: inline-flex; align-items: center; min-height: 42px; padding: 9px 14px; border-radius: 9px; font-size: 14px; }
.tool-nav a { color: #5e5877; font-weight: 650; text-decoration: none; }
.tool-nav a:hover { background: #f3f0fc; color: var(--purple-dark); }
.tool-nav a[aria-current="page"] { background: var(--purple-soft); color: #49349f; font-weight: 800; }
.suite-status { color: #817d91; background: #f5f4f8; }

main { max-width: 880px; margin: auto; padding: 36px 20px 72px; }
.eyebrow, .section-kicker { color: #5748b4; font-size: 12px; font-weight: 750; letter-spacing: .09em; }
h1 { margin: 9px 0; font-size: clamp(30px, 6vw, 46px); letter-spacing: -.04em; line-height: 1.2; }
.intro { max-width: 720px; margin: 0 0 20px; color: var(--muted); line-height: 1.7; }
.suite-note, .privacy-note { margin: 20px 0; padding: 14px 15px; border: 1px solid var(--warning-line); border-radius: 13px; background: var(--warning-bg); color: #745626; font-size: 13px; line-height: 1.75; }

.panel { scroll-margin-top: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: 0 12px 32px #2b215708; }
.panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel h2, .info-card h2 { margin: 5px 0 12px; font-size: 18px; line-height: 1.45; }
.text-button { border: 0; padding: 8px 0; background: transparent; color: #655b88; box-shadow: none; text-decoration: underline; font-size: 13px; cursor: pointer; }
.text-button:hover { color: var(--purple-dark); background: transparent; }

.drop { display: block; border: 2px dashed #c9c4e1; border-radius: 16px; padding: 30px 20px; text-align: center; background: #faf9ff; cursor: pointer; transition: background .15s, border-color .15s; }
.drop:hover, .drop:focus-within, .drop.dragging { border-color: #6555be; background: #f5f3ff; }
.drop:focus { outline: 3px solid #d9d2f6; outline-offset: 3px; }
.drop strong { display: block; color: #49349f; font-size: 21px; }
.drop span { display: block; margin-top: 5px; color: #77738a; font-size: 13px; line-height: 1.65; }
.drop small { display: block; margin-top: 13px; color: #686579; font-size: 12px; line-height: 1.65; }
.drop input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.drop-help { margin: 10px 0 0; color: #686579; font-size: 12px; line-height: 1.65; }
.drop.has-files { padding: 17px 18px; border-style: solid; background: #f7f5ff; }
.drop.has-files strong { font-size: 17px; }
.drop.has-files small { margin-top: 7px; }
.upload-feedback { display: flex; flex-direction: column; gap: 3px; margin-top: 12px; padding: 12px 14px; border: 1px solid #bfe2ca; border-radius: 11px; background: #eef9f1; color: #235c36; line-height: 1.5; }
.upload-feedback[hidden] { display: none; }
.upload-feedback span { font-size: 12px; overflow-wrap: anywhere; }
.upload-feedback.error { border-color: #efc6c1; background: #fff2f0; color: #91342d; }
.selected-section { scroll-margin-top: 16px; margin-top: 12px; padding: 14px; border: 1px solid #d8d2ed; border-radius: 14px; background: #faf9ff; }
.selected-section[hidden] { display: none; }
.selected-section:focus { outline: 3px solid #d9d2f6; outline-offset: 2px; }
.selected-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.selected-heading h3 { margin: 3px 0 0; font-size: 16px; line-height: 1.45; }
.selected-hint { color: #77738a; font-size: 12px; }

.section { margin-top: 20px; padding-top: 18px; border-top: 1px solid #eceaf2; }
.controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 7px; font-weight: 750; }
.field select { width: 100%; min-height: 46px; padding: 9px 11px; border: 1px solid #cbc8d7; border-radius: 10px; color: var(--ink); background: #fff; }
.quality-row { min-height: 46px; display: flex; align-items: center; gap: 10px; }
.quality-row input { min-width: 0; flex: 1; accent-color: var(--purple); }
.quality-row output { min-width: 44px; color: #514d64; font-variant-numeric: tabular-nums; }
.condition-summary { margin: 16px 0 0; padding: 12px 14px; border-left: 3px solid #c7bdf0; border-radius: 0 10px 10px 0; background: #f5f3fc; color: #514568; font-size: 13px; line-height: 1.6; }
.actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
button, .download-button, .download-all { border: 0; border-radius: 11px; padding: 13px 19px; background: var(--purple); color: #fff; font-weight: 750; cursor: pointer; text-decoration: none; text-align: center; }
button:hover, .download-button:hover, .download-all:hover { background: var(--purple-dark); }
button:disabled { cursor: not-allowed; background: #aaa6ba; }
.secondary { background: var(--purple-soft); color: #45368f; }
.secondary:hover { background: #dfdaf7; }

.status { display: none; margin-top: 16px; padding: 13px 14px; border-radius: 11px; background: #f0eef9; color: #403785; line-height: 1.6; }
.status:not(:empty) { display: block; }
.status.error { background: #fff0ee; color: #a53830; }
.result-section { min-width: 0; }
.file-list { display: grid; gap: 10px; max-height: min(440px, 55vh); margin-top: 12px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.file-item { min-width: 0; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 12px 14px; align-items: center; padding: 13px; border: 1px solid #e6e2f0; border-radius: 12px; background: #fff; overflow-wrap: anywhere; }
.thumb-wrap { position: relative; width: 62px; height: 58px; grid-row: span 2; overflow: hidden; border-radius: 9px; background: #f2effb; }
.thumb { display: none; width: 100%; height: 100%; object-fit: contain; }
.thumb-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #675f91; font-size: 10px; font-weight: 750; }
.file-badge { position: absolute; right: 3px; bottom: 3px; padding: 2px 5px; border-radius: 4px; background: #3e385d; color: #fff; font-size: 9px; font-weight: 800; }
.file-meta { min-width: 0; display: flex; flex-direction: column; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.file-size, .file-preview-note, .file-state { color: #77738a; font-size: 12px; }
.file-preview-note { margin-top: 3px; line-height: 1.45; white-space: normal; }
.file-state { grid-column: 2; }
.file-state.done { color: #22633a; font-weight: 750; }
.file-state.failed { color: #a53830; }
.item-action, .download-button { grid-column: 3; grid-row: 1 / span 2; min-height: 42px; padding: 10px 14px; font-size: 13px; }
.item-action { background: var(--purple-soft); color: #45368f; }
.item-action:hover { background: #dfdaf7; }
.empty-result { margin: 12px 0 0; padding: 14px; border-radius: 11px; background: #f5f4fa; color: #686579; font-size: 13px; line-height: 1.65; }
.empty-result[hidden] { display: none; }
.download-bar { margin-top: 14px; padding: 14px; border-radius: 12px; background: #eaf8ef; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.download-bar[hidden] { display: none; }
.download-bar > div { display: flex; flex-direction: column; }
.download-bar span { color: #4f705a; font-size: 12px; }
.download-all { flex: none; min-height: 42px; padding: 10px 14px; font-size: 13px; }
.download-help { margin: 12px 0 0; color: #686579; font-size: 12px; line-height: 1.65; }
.support-notes { margin-top: 18px; border: 1px solid #e6e2f0; border-radius: 12px; background: #fcfbff; padding: 0 16px; }
.support-notes summary { min-height: 48px; padding: 13px 0; cursor: pointer; color: #514568; font-size: 14px; font-weight: 700; line-height: 1.6; }
.support-notes p { margin: 0 0 16px; color: #686579; font-size: 13px; line-height: 1.7; }

.ad-reserve { min-height: 84px; margin: 22px 0 30px; border: 1px dashed #d4d0df; border-radius: 12px; background: #fff; color: #8b8798; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ad-reserve span { font-size: 10px; letter-spacing: .12em; }
.ad-reserve strong { margin-top: 3px; font-size: 12px; font-weight: 650; }
.info-card { scroll-margin-top: 18px; margin-top: 22px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.steps { margin: 14px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.steps li { min-width: 0; padding: 13px; border-radius: 11px; background: #f7f6fb; display: flex; flex-direction: column; gap: 5px; }
.steps strong { color: #49349f; font-size: 14px; }
.steps span { color: #686579; font-size: 13px; line-height: 1.65; }
.faq details { border-top: 1px solid #eceaf2; padding: 14px 0; }
.faq details:first-of-type { margin-top: 8px; }
.faq summary { cursor: pointer; color: #453f61; font-weight: 700; }
.faq p { margin: 9px 0 0; color: #686579; font-size: 13px; line-height: 1.7; }
.privacy-note { margin-top: 22px; }
footer { margin-top: 28px; color: #8b8998; font-size: 12px; line-height: 1.8; }
footer p { margin: 4px 0; }

@media (max-width: 640px) {
  .head { padding: 14px 16px; }
  .tool-nav { padding: 0 12px 8px; gap: 2px; }
  .tool-nav a, .suite-status { min-height: 42px; padding: 8px 11px; font-size: 13px; }
  main { padding: 24px 14px 50px; }
  h1 { font-size: 30px; line-height: 1.25; }
  .intro { margin-bottom: 18px; font-size: 14px; line-height: 1.65; }
  .suite-note { margin: 16px 0; }
  .panel { padding: 17px 14px; }
  .panel-heading { align-items: flex-start; }
  .panel h2, .info-card h2 { font-size: 17px; }
  .drop { padding: 26px 14px; }
  .drop.has-files { padding: 14px 12px; }
  .drop strong { font-size: 19px; }
  .drop span, .drop small { font-size: 12px; }
  .selected-section { padding: 12px; }
  .selected-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
  .file-list { max-height: min(390px, 52vh); }
  .controls { grid-template-columns: 1fr; }
  .actions > * { width: 100%; }
  .file-item { grid-template-columns: 54px minmax(0, 1fr); }
  .thumb-wrap { width: 54px; height: 54px; }
  .item-action, .download-button { width: 100%; grid-column: 1 / -1; grid-row: auto; }
  .download-bar { align-items: stretch; flex-direction: column; }
  .download-all { width: 100%; }
  .ad-reserve { min-height: 68px; }
  .info-card { padding: 18px 15px; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .head { align-items: flex-start; }
  .logo { max-width: 190px; }
  .panel-heading { display: block; }
  .text-button { margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
