.set-field {
    padding: 12px 0;
    border-bottom: 1px dashed var(--line);
}
.set-field:last-child {
    border-bottom: none;
}
.set-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 4px;
}
.set-hint {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ink-soft);
    margin-bottom: 10px;
}
.set-seg {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}
.set-seg-btn {
    flex: 1;
    padding: 10px 8px;
    border: none;
    border-right: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-soft);
    font-family: var(--font-head);
    font-size: 13px;
    letter-spacing: 0.03em;
    cursor: pointer;
}
.set-seg-btn:last-child {
    border-right: none;
}
.set-seg-btn:hover {
    background: var(--surface-alt);
    color: var(--ink);
}
.set-seg-btn.is-active {
    background: var(--btn-bg);
    color: #fff;
}
.set-select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 36px 11px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    background-color: var(--surface-alt);
    color: var(--ink);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    transition:
        border-color var(--dur-fast) var(--ease),
        box-shadow var(--dur-fast) var(--ease);
}
.set-select:focus {
    border-color: var(--brand-fg);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-fg) 20%, transparent);
}
.set-select option {
    background: var(--surface);
    color: var(--ink);
}
html[data-mode="light"] .set-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23565A63' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html[data-mode="dark"] .set-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A7ADB9' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.set-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}
.set-actions .mini-btn {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
}
.set-kbd-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
}
.set-kbd-row span:last-child {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ink-soft);
    font-size: 12px;
}
.settings-card kbd {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 2px 7px;
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--surface-alt);
    color: var(--ink);
}
.set-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.set-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--good);
}
.set-dot.is-off {
    background: var(--accent);
}
.set-file {
    display: none;
}
.set-error {
    min-height: 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-fg);
}

html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
}
html[data-toasts="off"] .toast-container {
    display: none !important;
}
html[data-scale="sm"] .main {
    zoom: 0.92;
}
html[data-scale="lg"] .main {
    zoom: 1.1;
}
html[data-density="compact"] .topbar {
    margin-bottom: 20px;
    padding-bottom: 12px;
}
html[data-density="compact"] .dispatch {
    padding: 14px 4px;
}
html[data-density="compact"] .activity-item {
    padding: 10px 4px;
}
html[data-density="compact"] .archive-row {
    padding: 11px 4px;
}
html[data-density="compact"] .pub-stat {
    padding: 14px 18px;
}
html[data-density="compact"] .task-card {
    padding: 10px 12px;
    gap: 8px;
}
html[data-density="compact"] .settings-card {
    padding: 16px 20px;
}
html[data-density="compact"] .ev-panel {
    padding: 16px 18px;
    margin-bottom: 16px;
}
html[data-density="compact"] .ev-table td {
    padding: 9px 8px;
}
@media (min-width: 881px) {
    html[data-density="compact"] .main {
        padding: 24px 32px 48px;
    }
}

.mode-color {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: none;
    background: var(--surface);
    color: var(--ink-soft);
    cursor: pointer;
    font-family: var(--font-head);
    font-size: 13.5px;
    letter-spacing: 0.03em;
}
.mode-color:hover {
    color: var(--ink);
    background: var(--surface-alt);
}
.mode-color.is-active {
    background: var(--btn-bg);
    color: #fff;
}
html[data-tint="on"] .mode-btn.is-active {
    background: var(--surface);
    color: var(--ink-soft);
}
html[data-tint="on"][data-mode] {
    --bg: color-mix(in srgb, var(--primary) 18%, #ffffff);
    --surface: color-mix(in srgb, var(--primary) 7%, #ffffff);
    --surface-alt: color-mix(in srgb, var(--primary) 14%, #ffffff);
    --ink: color-mix(in srgb, var(--primary-deep) 82%, #000000);
    --ink-soft: color-mix(in srgb, var(--primary-deep) 82%, #ffffff);
    --line: color-mix(in srgb, var(--primary) 26%, #ffffff);
    --overlay: color-mix(in srgb, var(--primary-deep) 60%, transparent);
    --heading: var(--primary-deep);
    --brand-fg: var(--primary);
    --accent-fg: var(--accent-deep);
    --good-fg: var(--good);
    --warn-fg: var(--warn);
    --btn-bg: var(--primary-deep);
    --btn-bg-hover: var(--primary);
    --shadow-1:
        0 1px 2px color-mix(in srgb, var(--primary-deep) 14%, transparent),
        0 1px 1px color-mix(in srgb, var(--primary-deep) 8%, transparent);
    --shadow-2:
        0 8px 20px color-mix(in srgb, var(--primary-deep) 16%, transparent),
        0 2px 6px color-mix(in srgb, var(--primary-deep) 10%, transparent);
    --shadow-3:
        0 24px 48px color-mix(in srgb, var(--primary-deep) 26%, transparent),
        0 8px 20px color-mix(in srgb, var(--primary-deep) 14%, transparent);
}
html[data-tint="on"] body {
    background: linear-gradient(
            160deg,
            color-mix(in srgb, var(--primary) 20%, #ffffff),
            color-mix(in srgb, var(--accent) 12%, #ffffff)
        )
        fixed;
}
html[data-tint="on"] .modal-field select,
html[data-tint="on"] .set-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23565A63' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media print {
    html[data-tint="on"] body {
        background: #fff;
    }
}