:root { color-scheme: light; font-family: Inter, "Microsoft YaHei", system-ui, sans-serif; color: #20272b; background: #f3f5f4; --green: #246f52; --green-dark: #19533c; --line: #dce2df; --muted: #6d7773; --danger: #a43f32; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; display: flex; flex-direction: column; background: #f3f5f4; }
button, input, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.topbar { height: 70px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #151b1d; color: white; border-bottom: 1px solid #2a3234; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 6px; }
.brand span, .member-summary span { display: flex; flex-direction: column; min-width: 0; }
.brand strong { font-size: 17px; }
.brand small { margin-top: 2px; color: #9ca7a3; font-size: 11px; }
.account-actions, .member-block { display: flex; align-items: center; gap: 10px; }
.member-summary { min-width: 112px; padding: 5px 8px; border: 0; color: white; background: transparent; text-align: right; }
.member-summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.member-summary small { margin-top: 2px; color: #aab6b1; font-size: 11px; }
.button, .icon-button { height: 40px; border: 1px solid transparent; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, border-color .15s, opacity .15s; }
.button { padding: 0 16px; font-weight: 600; }
.button svg, .icon-button svg { width: 18px; height: 18px; }
.button.primary { color: white; background: var(--green); border-color: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.button.subtle { color: #e8eeeb; background: #20282a; border-color: #344043; }
.button.subtle:hover { background: #293336; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.icon-button { width: 40px; padding: 0; color: #5e6965; background: transparent; border-color: #d1d9d5; }
.topbar .icon-button { color: #bdc6c2; border-color: #354044; }
.workspace { width: min(1240px, calc(100% - 48px)); margin: 28px auto; flex: 1; }
.resolver-bar { padding: 24px; background: white; border: 1px solid var(--line); border-radius: 8px; }
.resolver-heading { margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
h1, h2, p { margin: 0; }
.resolver-heading h1 { font-size: 22px; line-height: 1.3; }
.resolver-heading p, .dialog-head p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.quality-control { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
select, input { height: 42px; border: 1px solid #ccd5d1; border-radius: 6px; color: #252c2f; background: white; outline: none; }
select { min-width: 156px; padding: 0 34px 0 12px; }
input { width: 100%; padding: 0 13px; }
input:focus, select:focus { border-color: #4d8b70; box-shadow: 0 0 0 3px rgba(36,111,82,.1); }
.resolver-form { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; }
.input-wrap { position: relative; }
.input-wrap svg { position: absolute; left: 14px; top: 12px; width: 18px; color: #7d8783; }
.input-wrap input { padding-left: 42px; }
.parse-button { height: 42px; }
.empty-state { min-height: 390px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); }
.empty-icon { width: 62px; height: 62px; margin-bottom: 18px; display: grid; place-items: center; border: 1px solid #d4dcda; border-radius: 50%; background: #fff; }
.empty-icon svg { width: 27px; }
.empty-state h2 { color: #48514e; font-size: 17px; }
.empty-state p { margin-top: 7px; font-size: 13px; }
.result-section { margin-top: 20px; background: white; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.collection-head { min-height: 108px; padding: 18px 22px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.collection-cover { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 6px; object-fit: cover; background: #e4e9e7; }
.collection-copy { min-width: 0; flex: 1; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 700; }
.collection-copy h2 { margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; }
.collection-copy p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.collection-actions { display: flex; align-items: center; gap: 16px; }
.selection-count { color: var(--muted); font-size: 12px; }
.table-head, .track-row { display: grid; grid-template-columns: 84px minmax(240px, 1.8fr) minmax(150px, 1fr) 72px 54px; align-items: center; }
.table-head { height: 42px; padding: 0 18px; color: #7b8581; background: #f7f9f8; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; }
.check-control { display: inline-flex; align-items: center; gap: 7px; }
.check-control input, .track-check { width: 16px; height: 16px; accent-color: var(--green); }
.track-row { min-height: 74px; padding: 9px 18px; border-bottom: 1px solid #e7ebe9; }
.track-row:last-child { border-bottom: 0; }
.track-row.unsupported { opacity: .55; }
.track-select { display: flex; align-items: center; gap: 12px; }
.track-index { width: 28px; color: #8a9490; text-align: right; font-size: 12px; }
.track-info { min-width: 0; display: flex; align-items: center; gap: 11px; }
.track-cover { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 4px; object-fit: cover; background: #e5eae8; }
.track-copy { min-width: 0; }
.track-copy strong, .track-copy small, .track-album { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-copy strong { font-size: 13px; }
.track-copy small, .track-album, .track-duration { margin-top: 4px; color: var(--muted); font-size: 11px; }
.track-download { width: 36px; height: 36px; }
.track-download svg { width: 17px; }
footer { height: 48px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; color: #7b8581; border-top: 1px solid var(--line); font-size: 11px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: min(380px, calc(100vw - 48px)); padding: 11px 15px; color: white; background: #26322d; border-radius: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.2); opacity: 0; transform: translateY(8px); pointer-events: none; transition: .18s; font-size: 13px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #8f3c32; }
.modal-layer { position: fixed; inset: 0; z-index: 40; padding: 24px; display: grid; place-items: center; background: rgba(19,25,27,.56); }
.dialog { width: min(480px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: white; border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.packages-dialog { width: min(760px, 100%); }
.progress-dialog { width: min(620px, 100%); }
.dialog-head { padding: 20px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 19px; }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); padding: 3px; border: 1px solid #ccd5d1; border-radius: 6px; background: #f2f5f3; }
.segmented button { height: 34px; padding: 0 18px; border: 0; border-radius: 4px; color: #6c7672; background: transparent; }
.segmented button.active { color: var(--green-dark); background: white; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.auth-tabs { margin: 18px 22px 0; }
.dialog-form { padding: 18px 22px 22px; display: grid; gap: 15px; }
.dialog-form label > span { display: block; margin-bottom: 7px; color: #4c5652; font-size: 12px; font-weight: 700; }
.button.full { width: 100%; margin-top: 3px; }
.form-error { padding: 9px 11px; color: var(--danger); background: #fff3f1; border-radius: 5px; font-size: 12px; }
.payment-toolbar { padding: 13px 22px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 12px; }
.pay-tabs { width: 214px; }
.package-list { min-height: 120px; }
.package-item { min-height: 104px; padding: 17px 22px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid #e6ebe8; }
.package-item:last-child { border-bottom: 0; }
.package-main { min-width: 0; flex: 1; }
.package-main strong { font-size: 14px; }
.package-main p { margin: 5px 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.package-facts { display: flex; gap: 7px; }
.package-facts span { padding: 3px 7px; color: #286346; background: #edf5f1; border-radius: 4px; font-size: 11px; }
.package-price { color: #b54c31; font-size: 19px; font-weight: 800; }
.package-loading { padding: 44px; color: var(--muted); text-align: center; font-size: 13px; }
.payment-waiting { margin: 0 22px 18px; padding: 12px 13px; display: flex; align-items: center; gap: 11px; color: #276149; background: #eef7f2; border: 1px solid #c9ddd2; border-radius: 6px; }
.payment-waiting svg { width: 20px; animation: spin 1s linear infinite; }
.payment-waiting span, .payment-waiting small { display: block; }
.payment-waiting small { margin-top: 3px; color: #65716c; font-size: 10px; }
.download-queue { padding: 8px 22px 20px; }
.download-item { min-height: 58px; padding: 11px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid #e8ecea; }
.download-item:last-child { border-bottom: 0; }
.download-item strong, .download-item small { display: block; }
.download-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.download-item small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.download-state { color: var(--green); font-size: 11px; }
.download-state.error { color: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .topbar { height: 62px; padding: 0 14px; }
  .brand img { width: 36px; height: 36px; }
  .brand small, .member-summary, #packagesButton span, #loginButton span { display: none; }
  .button { padding: 0 12px; }
  .workspace { width: calc(100% - 24px); margin: 14px auto; }
  .resolver-bar { padding: 16px; }
  .resolver-heading { align-items: flex-start; }
  .resolver-heading h1 { font-size: 18px; }
  .quality-control { flex-direction: column; align-items: flex-start; gap: 4px; }
  select { min-width: 132px; }
  .resolver-form { grid-template-columns: minmax(0,1fr) 48px; }
  .parse-button { padding: 0; }
  .parse-button span { display: none; }
  .collection-head { align-items: flex-start; flex-wrap: wrap; }
  .collection-cover { width: 58px; height: 58px; flex-basis: 58px; }
  .collection-actions { width: 100%; justify-content: space-between; }
  .table-head { display: none; }
  .track-row { grid-template-columns: 44px minmax(0,1fr) 40px; padding: 10px 12px; }
  .track-select { gap: 6px; }
  .track-index { display: none; }
  .track-album, .track-duration { display: none; }
  .track-cover { width: 40px; height: 40px; flex-basis: 40px; }
  footer { padding: 0 14px; }
  .modal-layer { padding: 10px; align-items: end; }
  .dialog { max-height: calc(100vh - 20px); border-radius: 8px 8px 0 0; }
  .package-item { align-items: flex-end; flex-wrap: wrap; }
  .package-main { width: 100%; flex-basis: 100%; }
}
