:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", sans-serif; color: #202329; background: #f5f6f8; --muted: #686f7b; --edge: #e5e7ec; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 34px; letter-spacing: -.035em; font-weight: 680; }
h2 { font-size: 20px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
p { line-height: 1.7; }
.shell { width: min(1440px, calc(100% - 64px)); margin-inline: auto; }
.topbar { background: #ffffffda; border-bottom: 1px solid var(--edge); backdrop-filter: blur(16px); }
.topbar .shell { display: flex; justify-content: space-between; align-items: center; min-height: 64px; }
main { padding: 32px 0 96px; }
.page-heading { margin-bottom: 24px; }
.page-heading p { margin-top: 8px; }
.card { background: #fff; border: 1px solid var(--edge); border-radius: 18px; padding: 28px; box-shadow: 0 4px 20px #20293c04; }
.connection { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 26px; }
.connection h2 { font-size: 13px; color: var(--muted); }
.connection-state { font-size: 22px; font-weight: 650; margin: 5px 0; }
.connection-state::before { content: ""; display: inline-block; width: 9px; height: 9px; margin: 0 10px 2px 0; border-radius: 50%; background: #99a1ad; }
.connection-state[data-state="online"]::before { background: #178250; }
.connection-state[data-state="starting"]::before, .connection-state[data-state="waiting_callback"]::before { background: #c18419; }
.connection-state[data-state="auth_failed"]::before { background: #ce3535; }
.muted, .hint, .pagination { color: var(--muted); font-size: 13px; }
.hint { margin-top: 7px; }
.notice { color: #167047; font-size: 14px; }
.notice:empty { display: none; }
.notice.error, .error { color: #bf333b; }
#service-result { flex: 0 0 100%; }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 20px; padding: 4px; background: #eaecef; border-radius: 13px; }
.tabs button { flex: 1; white-space: nowrap; background: transparent; color: #5d6571; border: 0; border-radius: 9px; padding: 12px 18px; box-shadow: none; }
.tabs button[aria-selected="true"] { background: #fff; color: #1e2530; box-shadow: 0 1px 5px #12192716; }
.actions, .input-action, .section-title, .pagination, .group-row, .group-title, .mod-options, .logo-editor { display: flex; gap: 12px; align-items: center; }
.section-title, .group-title { justify-content: space-between; }
.input-action button, .group-title button, .group-row button { flex-shrink: 0; white-space: nowrap; }
.section-title { margin-bottom: 16px; }
.section-heading { border-top: 1px solid var(--edge); padding-top: 24px; margin-top: 26px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; margin-top: 20px; }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-all { grid-column: 1 / -1; }
.field { min-width: 0; }
label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
input:not([type="checkbox"]):not([type="hidden"]):not([type="file"]), textarea, select { width: 100%; min-width: 0; padding: 12px 14px; color: #242933; background: #fafbfc; border: 1px solid #d8dde5; border-radius: 9px; font: inherit; font-size: 14px; }
input::placeholder { color: #9299a5; }
textarea { resize: vertical; line-height: 1.7; }
button, .upload-button { min-height: 40px; padding: 10px 17px; border: 1px solid transparent; border-radius: 9px; background: #2868df; color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .15s; }
button:hover:not(:disabled) { background: #1f58c2; }
button.soft { background: #f4f5f7; color: #394352; border-color: #e1e4e9; }
button.soft:hover:not(:disabled) { background: #e9edf4; }
button.soft.danger { color: #b74046; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #78a9ff; outline-offset: 2px; }
.switch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 22px 0 26px; }
.switch-card { background: #f8f9fb; border: 1px solid var(--edge); border-radius: 12px; padding: 20px; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; }
.toggle input { appearance: none; width: 38px; height: 22px; border-radius: 12px; background: #cbd1db; position: relative; margin: 0; flex-shrink: 0; cursor: pointer; }
.toggle input::before { content: ""; width: 16px; height: 16px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0002; }
.toggle input:checked { background: #2868df; }
.toggle input:checked::before { left: 19px; }
.group-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; min-height: 40px; }
.group-title button, .remove-group { padding: 6px 10px; white-space: nowrap; }
.group-row + .group-row { margin-top: 8px; }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.category-row { display: flex; gap: 10px; align-items: center; }
.category-row button { white-space: nowrap; }
.mod-settings { border: 1px solid var(--edge); border-radius: 14px; padding: 24px; margin-top: 20px; background: #fdfdfe; }
.mod-settings .field-grid { margin-top: 0; }
.mod-options { flex-wrap: wrap; gap: 20px; padding-block: 22px; }
.uid, .count { font-size: 12px; background: #eef3fc; color: #426090; padding: 4px 9px; border-radius: 6px; }
.count { vertical-align: middle; }
.logo-editor { flex-wrap: wrap; }
.logo-preview { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--edge); border-radius: 10px; background: #fff; }
.upload-button { display: inline-flex; align-items: center; position: relative; overflow: hidden; margin: 0; background: #edf3ff; color: #285db7; }
.upload-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload-button:focus-within { outline: 3px solid #78a9ff; }
.savebar { margin-top: 20px; padding: 14px 20px; background: #fff; border: 1px solid var(--edge); border-radius: 12px; box-shadow: 0 5px 25px #27314912; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.savebar .hint { margin: 0; }
.save { padding-inline: 30px; flex-shrink: 0; }
details { margin-top: 18px; }
summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.preview-button { display: block; width: 100%; padding: 0; margin-top: 16px; background: none; border-radius: 14px; overflow: hidden; cursor: zoom-in; }
.preview-button img { display: block; width: 100%; }
.compact { margin: 0; font-weight: 400; font-size: 13px; }
.empty { text-align: center; padding: 32px; color: var(--muted); }
.mono, pre { font-family: Consolas, "Cascadia Mono", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.mono { font-size: 13px; }
pre { background: #f6f7f9; color: #424c5b; border: 1px solid var(--edge); padding: 18px; border-radius: 12px; overflow: auto; font-size: 12px; line-height: 1.8; }
#log-lines { min-height: 280px; max-height: 520px; }
#gradle-lines { max-height: 360px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 1040px; font-size: 13px; }
th, td { text-align: left; padding: 14px 10px; border-bottom: 1px solid var(--edge); }
th { color: var(--muted); font-weight: 600; white-space: nowrap; background: #fafbfc; }
td button { min-height: 32px; font-size: 12px; padding: 6px 10px; white-space: nowrap; }
.pagination { margin-top: 18px; justify-content: flex-end; }
.fingerprint { margin-top: 24px; }
#image-viewer { width: calc(100vw - 48px); max-width: 1700px; height: calc(100vh - 48px); max-height: none; padding: 0; border: 1px solid #e5e7ec; border-radius: 16px; box-shadow: 0 20px 80px #0005; }
#image-viewer::backdrop { background: #222936a6; backdrop-filter: blur(6px); }
.viewer-toolbar { display: flex; gap: 10px; align-items: center; padding: 14px 18px; height: 70px; border-bottom: 1px solid var(--edge); }
.viewer-toolbar strong { margin-right: auto; }
#zoom-level { font-size: 13px; min-width: 44px; text-align: center; }
#image-viewport { width: 100%; height: calc(100% - 70px); overflow: auto; background: #eef0f4; cursor: grab; overscroll-behavior: contain; }
#image-viewport.dragging { cursor: grabbing; }
#viewer-image { display: block; max-width: none; margin: auto; user-select: none; }
@media (max-width: 900px) { .three-columns, .switch-grid { grid-template-columns: 1fr; } .shell { width: calc(100% - 36px); } }
@media (max-width: 600px) { .field-grid, .category-grid { grid-template-columns: 1fr; } .card, .mod-settings { padding: 18px; } .tabs button { padding: 11px 14px; } .connection { align-items: flex-start; } .viewer-toolbar { padding: 10px; gap: 5px; } .viewer-toolbar strong { display: none; } .viewer-toolbar button { padding-inline: 10px; } #image-viewer { width: calc(100vw - 16px); height: calc(100vh - 16px); } .savebar { padding: 12px; } }
@media (prefers-reduced-motion: reduce) { button { transition: none; } }

.mod-overview { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.mod-identity { display: flex; align-items: center; gap: 15px; min-width: 0; }
.mod-identity h3 { font-size: 20px; overflow-wrap: anywhere; }
.mod-identity img { width: 52px; height: 52px; object-fit: contain; border-radius: 9px; }
.mod-statuses { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; color: #687382; font-size: 12px; }
.mod-shortcuts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 18px; }
.mod-drag-handle { margin-right: auto; cursor: grab; user-select: none; }
.mod-drag-handle:active { cursor: grabbing; }
.mod-drag-handle [data-mod-position] { display: inline-block; min-width: 24px; margin-left: 5px; color: #285db7; }
.mod-settings.mod-dragging { opacity: .55; border-color: #78a9ff; background: #edf3ff; }
.mod-body { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--edge); }
.notification-actions { display: flex; gap: 24px; align-items: center; justify-content: space-between; }
.notification-actions button { flex-shrink: 0; white-space: nowrap; }
.notification-preview { font-family: inherit; font-size: 14px; line-height: 1.8; }
.module-notification > .notice { margin-top: 12px; }
.update-record { padding: 18px 0; border-bottom: 1px solid var(--edge); }
.update-content { margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.module-notification [data-update-records] { padding-top: 10px; font-size: 14px; }
@media (max-width: 600px) { .mod-overview { align-items: flex-start; flex-direction: column; gap: 12px; } .mod-statuses { justify-content: flex-start; } }
