:root { color-scheme: dark; --surface: #202630; --background: #171c24; --line: #37414c; --ink: #eff5f8; --muted: #a8b6c3; --accent: #9be5cf; --accent-ink: #133c32; --error: #ffc0b5; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--background); color: var(--ink); font: 14px/1.6 'Microsoft YaHei UI', 'PingFang SC', sans-serif; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button { transition: background-color 150ms ease, color 150ms ease; }
a { color: var(--accent); text-underline-offset: 4px; }
.app-header { display: flex; align-items: center; gap: 24px; height: 76px; padding: 0 40px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 21px; font-weight: 700; letter-spacing: -.3px; }
.brand svg { color: var(--accent); width: 28px; height: 28px; }
.header-caption { color: var(--muted); padding-left: 24px; border-left: 1px solid var(--line); }
#logout { margin-left: auto; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; font-weight: 600; line-height: 1.4; }
h2 { font-size: 18px; font-weight: 600; line-height: 1.5; }
.settings-view { max-width: 1520px; padding: 34px 40px 40px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 32px; }
.page-heading p { margin-top: 7px; color: var(--muted); }
.collector-status { color: var(--muted); font-size: 12px; text-align: right; }
.collector-status[data-online="true"] { color: var(--accent); }
.workspace { display: grid; grid-template-columns: 205px 330px minmax(280px, 1fr); align-items: start; }
.component-nav { display: flex; flex-direction: column; gap: 8px; padding-right: 24px; }
.component-nav button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 12px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 8px; }
.component-nav button:hover { background: var(--surface); color: var(--ink); }
.component-nav button[aria-current="page"] { color: var(--accent); background: #263d39; }
.nav-symbol { width: 24px; height: 24px; flex: none; }
.nav-symbol svg { width: 100%; height: 100%; }
.component-nav strong { display: block; font-size: 14px; font-weight: 600; }
.component-nav small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.editor { border-left: 1px solid var(--line); padding: 4px 28px 0; }
.editor-heading, .preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.dirty-state { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dirty-state[data-dirty="true"] { color: #f0d299; }
.field { margin-bottom: 23px; }
.field label, .style-field legend { display: block; margin-bottom: 8px; font-weight: 500; }
.field small { display: block; color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 7px; }
input:not([type="checkbox"]), select { border: 1px solid #4a5664; border-radius: 6px; background: #222a35; color: var(--ink); min-height: 42px; width: 100%; padding: 9px 12px; }
select { cursor: pointer; padding-right: 24px; }
input:invalid:not(:placeholder-shown):focus { border-color: var(--error); }
.number-field { position: relative; }
.number-field input { padding-right: 48px; }
.number-field span { position: absolute; right: 13px; top: 9px; color: var(--muted); pointer-events: none; }
.style-field { padding: 0; margin: 0 0 23px; border: 0; display: flex; gap: 10px; }
.style-field label { display: inline-flex; gap: 8px; align-items: center; min-height: 40px; padding: 7px 13px; border: 1px solid #4a5664; border-radius: 6px; cursor: pointer; }
.style-field label:has(input:checked) { border-color: var(--accent); background: #263d39; }
.style-field input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.bold-label { font-weight: 700; }
.italic-label { font-style: italic; }
.duration-field { margin-top: 25px; padding-top: 23px; border-top: 1px solid var(--line); }
.save-row { display: flex; align-items: center; gap: 14px; padding-top: 5px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 42px; padding: 9px 19px; border: 0; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.primary-button:hover { background: #b9f1e1; }
.primary-button svg { width: 20px; height: 20px; }
.quiet-button { border: 0; border-radius: 6px; background: transparent; color: var(--muted); padding: 9px 7px; min-height: 42px; }
.quiet-button:hover { color: var(--ink); background: var(--surface); }
.form-status { min-height: 23px; margin-top: 12px; color: var(--accent); font-size: 12px; }
.form-status[data-error="true"] { color: var(--error); }
.preview-panel { border-left: 1px solid var(--line); padding: 4px 0 0 28px; }
.preview-heading { margin-bottom: 16px; }
.preview-heading a { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; text-decoration: none; }
.preview-heading a:hover { text-decoration: underline; }
.preview-heading svg { width: 16px; height: 16px; }
.preview-box { position: relative; overflow: hidden; background: #202d2a; width: 100%; height: 395px; border-radius: 8px; }
.preview-box iframe { position: absolute; left: 50%; top: 50%; border: 0; transform-origin: center; z-index: 1; }
.preview-empty { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--muted); }
.preview-note { font-size: 12px; color: var(--muted); margin-top: 9px; }
.source-heading { margin-top: 27px; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.source-heading span { font-size: 12px; color: var(--muted); }
.source-link { display: flex; gap: 8px; }
.source-link input { min-width: 0; color: var(--muted); font-size: 12px; }
.source-link button { flex: none; padding: 8px 12px; border: 1px solid #4a5664; border-radius: 6px; background: #293440; color: var(--ink); }
.source-link button:hover { background: #384756; }
.source-help { color: var(--muted); margin-top: 7px; font-size: 11px; }
.login-view { max-width: 860px; margin: 14vh auto 40px; padding: 40px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr); gap: 60px; align-items: center; }
.login-intro h1 { font-size: 30px; }
.login-intro p { margin-top: 19px; line-height: 1.9; color: var(--muted); }
.login-form { padding-left: 35px; border-left: 1px solid var(--line); }
.login-form label { display: block; margin-bottom: 9px; }
.login-form .primary-button { margin-top: 16px; width: 100%; }
.loading { color: var(--muted); margin: 80px 40px; text-align: center; }
@media (min-width: 1380px) { .preview-box { height: 440px; } }
@media (max-width: 1130px) { .app-header { padding: 0 24px; } .settings-view { padding: 28px 24px; } .workspace { grid-template-columns: 170px 295px minmax(260px, 1fr); } .component-nav { padding-right: 14px; } .component-nav button { padding-inline: 10px; gap: 9px; } .editor { padding-inline: 20px; } .preview-panel { padding-left: 20px; } }
@media (max-width: 940px) { .workspace { grid-template-columns: 310px minmax(280px, 1fr); } .component-nav { grid-column: 1 / -1; flex-direction: row; padding: 0 0 26px; gap: 10px; } .component-nav button { width: auto; flex: 1; } .editor { border: 0; padding-left: 0; padding-right: 28px; } .preview-box { height: 395px; } }
@media (max-width: 650px) { .app-header { height: 64px; padding: 0 18px; gap: 12px; } .header-caption { display: none; } .brand { font-size: 19px; } .settings-view { padding: 24px 18px; } h1 { font-size: 25px; } .page-heading { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 22px; } .collector-status { text-align: left; } .page-heading p { font-size: 12px; } .workspace { display: flex; flex-direction: column; } .component-nav { width: 100%; padding-bottom: 25px; gap: 5px; } .component-nav button { justify-content: center; padding: 10px 6px; min-height: 52px; } .component-nav small, .nav-symbol { display: none; } .component-nav strong { font-size: 12px; } .editor { width: 100%; padding: 0; } .editor-heading { margin-bottom: 20px; } #settings-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; } .field small { font-size: 11px; } .style-field, .duration-field, .save-row, #save-status { grid-column: 1 / -1; } .duration-field { margin-top: 0; } .preview-panel { padding: 27px 0 0; border-left: 0; border-top: 1px solid var(--line); width: 100%; margin-top: 15px; } .preview-box { height: 370px; } .login-view { margin: 40px auto; padding: 24px; grid-template-columns: 1fr; gap: 34px; max-width: 440px; } .login-intro h1 { font-size: 28px; } .login-form { padding: 0; border: 0; } }
@media (prefers-reduced-motion: reduce) { button { transition: none; } }

/* Information editor uses the same controls and palette as the existing tools. */
textarea { width: 100%; min-height: 82px; resize: vertical; border: 1px solid #4a5664; border-radius: 6px; background: #222a35; color: var(--ink); font: inherit; padding: 9px 12px; }
textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.workspace[data-info="true"] { grid-template-columns: 205px minmax(375px, 1fr) minmax(300px, .9fr); }
.workspace[data-info="true"] .preview-panel { position: sticky; top: 24px; }
.workspace[data-info="true"] .preview-box { height: 250px; }
.info-timing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.color-field { display: flex; align-items: center; gap: 12px; border: 1px solid #4a5664; border-radius: 6px; background: #222a35; padding: 5px 10px; }
.color-field input[type="color"] { width: 34px; height: 32px; min-height: 0; border: 0; padding: 0; background: transparent; cursor: pointer; }
.color-field output { font-variant-numeric: tabular-nums; color: var(--muted); }
.info-content { padding-top: 23px; margin-top: 28px; border-top: 1px solid var(--line); }
.content-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 9px; }
.content-heading h3 { font-size: 17px; font-weight: 600; margin: 0; }
.content-heading p, .field-note { font-size: 12px; color: var(--muted); }
.field-note { margin-bottom: 16px; }
.outline-button { display: inline-flex; align-items: center; justify-content: center; padding: 7px 12px; min-height: 36px; border: 1px solid #4a5664; background: #293440; color: var(--ink); border-radius: 6px; font-size: 12px; white-space: nowrap; }
.outline-button:hover { background: #384756; border-color: #6e8291; }
.info-items { display: flex; flex-direction: column; gap: 9px; }
.info-item { border: 1px solid #414d5a; border-radius: 6px; overflow: hidden; background: #1d242e; }
.info-item[data-drop="true"] { border-color: var(--accent); box-shadow: 0 -3px 0 var(--accent); }
.info-item[data-dragging="true"] { opacity: .45; }
.item-heading { display: flex; align-items: center; min-height: 49px; gap: 2px; padding: 4px 6px; }
.item-title { min-width: 0; flex: 1; padding: 7px 4px; color: var(--ink); background: transparent; border: 0; font-size: 13px; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.item-title:hover { color: var(--accent); }
.item-title[aria-expanded="true"] { color: var(--accent); }
.drag-handle { border: 0; background: transparent; color: var(--muted); font-size: 23px; line-height: 1; padding: 4px; cursor: grab; }
.drag-handle:active { cursor: grabbing; }
.item-actions { flex: none; display: flex; align-items: center; gap: 1px; }
.item-action { padding: 6px 7px; min-width: 26px; min-height: 32px; border: 0; background: transparent; color: var(--muted); border-radius: 4px; font-size: 12px; }
.item-action:hover { background: #303c48; color: var(--ink); }
.item-action:disabled { opacity: .3; cursor: default; }
.delete-action { color: #e6ada7; }
.item-editor { padding: 16px; border-top: 1px solid var(--line); }
.item-editor .field { margin-bottom: 16px; }
.item-editor .field:last-child { margin-bottom: 0; }
.item-editor label { font-size: 12px; color: var(--muted); }
.item-media { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 3px; }
.item-media img { width: 36px; height: 36px; object-fit: contain; background: #33404d; border-radius: 4px; }
.media-selection { flex: 1; min-width: 100px; color: var(--muted); font-size: 12px; }
.content-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; }
.content-footer .quiet-button { font-size: 12px; }
.info-empty { color: var(--muted); padding: 22px 12px; text-align: center; font-size: 12px; }
.media-dialog { width: min(760px, calc(100vw - 36px)); max-height: calc(100vh - 60px); padding: 24px; background: var(--background); color: var(--ink); border: 1px solid #526272; border-radius: 10px; }
.media-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.media-heading { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.media-heading p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.media-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.media-toolbar span { font-size: 12px; color: var(--muted); }
.media-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 12px; padding-top: 9px; }
.media-gallery > .info-empty { grid-column: 1 / -1; }
.media-card { padding: 14px 10px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; text-align: center; min-width: 0; }
.media-card > img { width: 64px; height: 64px; object-fit: contain; background: #33404d; border-radius: 4px; }
.media-filename { color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; margin-top: 9px; }
.media-card-actions { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 9px; }
.media-card-actions button { font-size: 12px; padding: 5px 8px; }
@media (max-width: 1200px) { .workspace[data-info="true"] { grid-template-columns: 175px minmax(355px, 1fr) minmax(260px, .85fr); } }
@media (max-width: 1050px) { .workspace[data-info="true"] { grid-template-columns: minmax(340px, 1fr) minmax(280px, .9fr); } .workspace[data-info="true"] .component-nav { grid-column: 1 / -1; flex-direction: row; padding: 0 0 26px; gap: 7px; } .workspace[data-info="true"] .component-nav button { width: auto; flex: 1; padding-inline: 9px; } .workspace[data-info="true"] .editor { padding-left: 0; border-left: 0; } .workspace[data-info="true"] .component-nav small { display: none; } }
@media (max-width: 760px) { .workspace[data-info="true"] { display: flex; flex-direction: column; } .workspace[data-info="true"] .editor { padding: 0; width: 100%; } .workspace[data-info="true"] .preview-panel { position: static; width: 100%; border-left: 0; padding: 25px 0 0; margin-top: 20px; border-top: 1px solid var(--line); } .workspace[data-info="true"] .component-nav { width: 100%; padding-bottom: 22px; } .workspace[data-info="true"] .nav-symbol { display: none; } }
@media (max-width: 650px) { #info-options { grid-column: 1 / -1; } .workspace[data-info="true"] .component-nav { flex-wrap: wrap; } .workspace[data-info="true"] .component-nav button { flex-basis: calc(50% - 5px); justify-content: center; } .media-dialog { padding: 18px; } }
