/* 护眼暗色：柔和深灰蓝 + 低饱和青绿点缀 */
:root {
    --net-bg-1: #000000;
    --net-bg-2: #000000;
    --net-bg-3: #000000;
    --net-primary: #7eb8da;
    --net-primary-soft: #5a8fad;
    --net-primary-dim: rgba(126, 184, 218, 0.14);
    --net-accent: #6db3a8;
    --net-accent-dim: rgba(109, 179, 168, 0.12);
    --net-warm: #c9a87c;
    --net-warm-dim: rgba(201, 168, 124, 0.12);
    --net-text: #d4dee8;
    --net-text-body: #b8c5d4;
    --net-text-muted: #7a8d9e;
    --net-surface: rgba(32, 42, 56, 0.88);
    --net-surface-solid: #252f3d;
    --net-surface-raised: #2c3848;
    --net-border: rgba(126, 184, 218, 0.12);
    --net-border-strong: rgba(126, 184, 218, 0.22);
    --net-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
    --net-radius: 10px;
    --net-input-bg: #1e2834;
    --net-canvas-bg: rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: #000000;
    color: var(--net-text-body);
    min-height: 100vh;
    overflow: hidden;
}

.net-bg-deco {
    display: none;
}

.net-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--net-surface);
    border-bottom: 1px solid var(--net-border);
    box-shadow: var(--net-shadow);
    backdrop-filter: blur(14px);
    flex-wrap: wrap;
}

.net-topbar h1 {
    font-size: 15px;
    font-weight: 600;
    color: var(--net-text);
    white-space: nowrap;
    margin-right: 4px;
}

.net-topbar h1 span {
    color: var(--net-accent);
    font-weight: 400;
    font-size: 11px;
    margin-left: 6px;
    opacity: 0.85;
}

.net-btn,
.net-back-word {
    border: 1px solid var(--net-border-strong);
    background: var(--net-surface-raised);
    color: var(--net-text-body);
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.net-btn:hover,
.net-back-word:hover {
    background: var(--net-primary-dim);
    border-color: rgba(126, 184, 218, 0.35);
    color: var(--net-text);
}

.net-btn.primary {
    background: linear-gradient(135deg, rgba(90, 143, 173, 0.55), rgba(70, 120, 150, 0.65));
    border-color: rgba(126, 184, 218, 0.35);
    color: var(--net-text);
}

.net-btn.primary:hover {
    background: linear-gradient(135deg, rgba(100, 155, 185, 0.65), rgba(80, 130, 160, 0.75));
}

.net-btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.net-topbar-actions-wrap {
    display: contents;
}

.net-root-input {
    border: 1px solid var(--net-border-strong);
    background: var(--net-input-bg);
    color: var(--net-text);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    width: 140px;
    outline: none;
}

.net-root-input:focus {
    border-color: rgba(126, 184, 218, 0.45);
    box-shadow: 0 0 0 2px rgba(126, 184, 218, 0.12);
}

.net-status {
    margin-left: auto;
    font-size: 11px;
    color: var(--net-text-muted);
}

.net-layout {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    --net-catalog-w: 220px;
    --net-sidebar-w: 368px;
}

.net-catalog-panel {
    width: var(--net-catalog-w);
    flex-shrink: 0;
    background: var(--net-surface);
    border-right: 1px solid var(--net-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.22s ease, opacity 0.18s ease, border-color 0.18s;
}

.net-layout.is-left-collapsed {
    --net-catalog-w: 0px;
}

.net-layout.is-left-collapsed .net-catalog-panel {
    opacity: 0;
    pointer-events: none;
    border-right-color: transparent;
}

.net-catalog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--net-border);
    background: rgba(38, 50, 64, 0.45);
}

.net-catalog-head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.net-catalog-head h2 {
    font-size: 12px;
    color: var(--net-primary);
    letter-spacing: 0.05em;
    font-weight: 600;
    opacity: 0.9;
}

.net-catalog-add {
    border: 1px solid var(--net-border-strong);
    background: var(--net-primary-dim);
    color: var(--net-primary);
    border-radius: 8px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.net-catalog-add:hover {
    background: rgba(126, 184, 218, 0.22);
}

.net-catalog-tree {
    flex: 1;
    overflow-y: auto;
    padding: 8px 6px;
}

.net-catalog-node {
    user-select: none;
}

.net-catalog-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    color: var(--net-text-body);
    transition: background 0.15s;
}

.net-catalog-row:hover {
    background: var(--net-primary-dim);
}

.net-catalog-row.active {
    background: rgba(90, 130, 160, 0.22);
    color: var(--net-text);
    box-shadow: inset 3px 0 0 var(--net-primary-soft);
}

.net-catalog-toggle {
    width: 16px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--net-text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 10px;
    line-height: 1;
}

.net-catalog-toggle.placeholder {
    visibility: hidden;
}

.net-catalog-icon {
    color: var(--net-warm);
    font-size: 11px;
    flex-shrink: 0;
    opacity: 0.85;
}

.net-catalog-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.net-catalog-sub {
    font-size: 10px;
    color: var(--net-text-muted);
    margin-left: 2px;
    font-weight: 400;
}

.net-catalog-children {
    margin-left: 14px;
}

.net-catalog-hint {
    padding: 8px 10px;
    font-size: 10px;
    line-height: 1.45;
    color: var(--net-text-muted);
    border-top: 1px solid var(--net-border);
    background: var(--net-warm-dim);
}

.net-map-area {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.net-rail-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
    width: 24px;
    height: 58px;
    padding: 0;
    border: 1px solid var(--net-border-strong);
    background: rgba(38, 50, 66, 0.97);
    color: var(--net-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
    transition: background 0.15s, color 0.15s, border-color 0.15s, left 0.22s ease, right 0.22s ease;
}

.net-rail-toggle:hover {
    background: rgba(52, 68, 86, 0.98);
    color: var(--net-text);
    border-color: rgba(126, 184, 218, 0.5);
}

.net-rail-toggle-left {
    left: calc(var(--net-catalog-w) - 12px);
    border-radius: 0 10px 10px 0;
}

.net-layout.is-left-collapsed .net-rail-toggle-left {
    left: 0;
}

.net-rail-toggle-right {
    right: calc(var(--net-sidebar-w) - 12px);
    border-radius: 10px 0 0 10px;
}

.net-layout.is-right-collapsed .net-rail-toggle-right {
    right: 0;
}

.net-map-toolbar {
    padding: 6px 12px;
    font-size: 11px;
    color: var(--net-text-muted);
    border-bottom: 1px solid var(--net-border);
    background: rgba(28, 38, 50, 0.6);
}

.net-map-toolbar kbd {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--net-surface-raised);
    border: 1px solid var(--net-border-strong);
    color: var(--net-primary);
    font-size: 10px;
    margin: 0 1px;
}

#mindmap-svg {
    flex: 1;
    width: 100%;
    min-height: 200px;
    display: block;
    background: var(--net-canvas-bg);
    cursor: grab;
    user-select: none;
}

#mindmap-svg:active {
    cursor: grabbing;
}

.mm-node {
    cursor: grab;
}

.mm-node.mm-selected {
    filter: drop-shadow(0 0 12px rgba(126, 184, 218, 0.55)) drop-shadow(0 3px 10px rgba(0, 0, 0, 0.38));
}

.mm-node.mm-center-node .mm-node-bg {
    stroke-opacity: 0.95;
}

.mm-node.mm-dragging {
    cursor: grabbing;
}

.mm-node-ghost {
    pointer-events: none;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}

.mm-drag-placeholder {
    pointer-events: none;
}

.mm-edge-preview {
    pointer-events: none;
}

.mm-edge-ghost {
    pointer-events: none;
}

.mm-edge {
    pointer-events: none;
}

.net-sidebar-note {
    font-size: 11px;
    color: var(--net-text-muted);
    margin: -6px 0 10px;
    line-height: 1.45;
}

.net-context-menu {
    position: fixed;
    z-index: 300;
    min-width: 168px;
    background: var(--net-surface-solid);
    border: 1px solid var(--net-border-strong);
    border-radius: var(--net-radius);
    padding: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: none;
    flex-direction: column;
    gap: 2px;
}

.net-context-menu.show {
    display: flex;
}

.net-context-menu button {
    border: none;
    background: transparent;
    color: var(--net-text-body);
    text-align: left;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.net-context-menu button:hover {
    background: var(--net-primary-dim);
    color: var(--net-text);
}

.net-context-menu button.danger {
    color: #d4a0a0;
}

.net-context-menu button.danger:hover {
    background: rgba(180, 100, 100, 0.15);
}

.net-context-menu hr {
    border: none;
    border-top: 1px solid var(--net-border);
    margin: 4px 0;
}

.net-context-menu button .net-menu-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-left: auto;
    flex-shrink: 0;
}

.net-context-menu button .net-menu-icon-preview {
    margin-left: auto;
    color: var(--net-text-muted);
    font-size: 12px;
    flex-shrink: 0;
}

#net-context-menu,
#net-canvas-menu {
    min-width: 248px;
    padding: 10px;
    gap: 4px;
    border-radius: 12px;
}

#net-canvas-menu {
    min-width: 200px;
}

#net-context-menu button,
#net-canvas-menu button {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 16px;
    gap: 10px;
}

#net-context-menu button i,
#net-canvas-menu button i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

#net-context-menu hr {
    margin: 6px 0;
}

#net-context-menu button .net-menu-swatch {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border-width: 2px;
}

#net-context-menu button .net-menu-icon-preview {
    font-size: 16px;
}

.net-picker-panel {
    position: fixed;
    z-index: 310;
    width: min(440px, calc(100vw - 24px));
    background: var(--net-surface-solid);
    border: 1px solid var(--net-border-strong);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.net-picker-panel.hidden {
    display: none;
}

.net-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--net-text);
}

.net-picker-clear {
    border: none;
    background: transparent;
    color: var(--net-text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
}

.net-picker-clear:hover {
    background: var(--net-primary-dim);
    color: var(--net-text);
}

.net-picker-preview {
    height: 54px;
    border-radius: 10px;
    border: 2px solid var(--net-border-strong);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    overflow: hidden;
}

.net-picker-preview-eng {
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
}

.net-picker-preview-zh {
    font-size: 16px;
    line-height: 1;
}

.net-picker-preview.net-icon-preview {
    background: rgba(38, 50, 66, 0.94);
    font-size: 28px;
    color: #9eb8cc;
}

.net-picker-preview-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    padding: 0 6px;
    text-align: center;
    word-break: break-all;
}

.net-picker-preview-default {
    font-size: 14px;
    color: var(--net-text-muted);
}

.net-picker-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}

.net-color-swatch {
    width: 100%;
    aspect-ratio: 1;
    min-height: 44px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    overflow: hidden;
}

.net-swatch-eng {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.net-swatch-zh {
    font-size: 10px;
    line-height: 1;
}

.net-color-swatch:hover {
    transform: scale(1.08);
}

.net-color-swatch.is-active {
    border-color: #fff;
    box-shadow: 0 0 0 1px rgba(126, 184, 218, 0.6);
}

.net-icon-swatch {
    width: 100%;
    aspect-ratio: 1;
    min-height: 44px;
    border: 2px solid var(--net-border);
    border-radius: 8px;
    background: rgba(38, 50, 66, 0.6);
    color: #9eb8cc;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.net-icon-swatch:hover {
    background: var(--net-primary-dim);
    color: var(--net-text);
}

.net-icon-swatch.is-active {
    border-color: rgba(126, 184, 218, 0.65);
    background: rgba(62, 86, 112, 0.85);
    color: #eef4fa;
}

@media (max-width: 520px) {
    #net-context-menu {
        min-width: 220px;
    }

    #net-context-menu button {
        padding: 11px 14px;
        font-size: 15px;
    }

    .net-picker-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .net-color-swatch,
    .net-icon-swatch {
        min-height: 52px;
    }

    .net-icon-swatch {
        font-size: 22px;
    }
}

.mm-node-icon-block-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.net-sidebar {
    width: var(--net-sidebar-w);
    flex-shrink: 0;
    background: var(--net-surface);
    border-left: 1px solid var(--net-border);
    padding: 14px;
    overflow-y: auto;
    transition: width 0.22s ease, opacity 0.18s ease, padding 0.18s ease, border-color 0.18s;
}

.net-layout.is-right-collapsed {
    --net-sidebar-w: 0px;
}

.net-layout.is-right-collapsed .net-sidebar {
    opacity: 0;
    pointer-events: none;
    padding: 0;
    border-left-color: transparent;
    overflow: hidden;
}

.net-sidebar h2 {
    font-size: 12px;
    color: var(--net-accent);
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    font-weight: 600;
    opacity: 0.9;
}

.net-dash {
    position: relative;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(232, 184, 74, 0.28);
    background:
        radial-gradient(ellipse at 12% 0%, rgba(232, 184, 74, 0.16), transparent 55%),
        radial-gradient(ellipse at 90% 100%, rgba(109, 179, 168, 0.12), transparent 50%),
        linear-gradient(160deg, rgba(36, 48, 64, 0.98), rgba(24, 32, 44, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.net-dash-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.net-dash-level-wrap {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(232, 184, 74, 0.28), rgba(180, 120, 40, 0.18));
    border: 1px solid rgba(232, 184, 74, 0.45);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.net-dash-level-star {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8b84a;
    color: #3a2a0a;
    font-size: 9px;
    box-shadow: 0 2px 6px rgba(232, 184, 74, 0.45);
}

.net-dash.is-level-up .net-dash-level-wrap {
    animation: net-dash-level-pop 0.55s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.net-dash-level {
    font-size: 13px;
    font-weight: 700;
    color: #ffe6a8;
    letter-spacing: 0.02em;
}

.net-dash-level strong {
    font-size: 18px;
    font-weight: 800;
    margin-left: 1px;
}

.net-dash-head-text {
    min-width: 0;
    flex: 1;
}

.net-dash-title {
    font-size: 14px;
    font-weight: 700;
    color: #f3f7fb;
    letter-spacing: 0.04em;
}

.net-dash-cheer {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.35;
    color: #c5d6e4;
    min-height: 15px;
    transition: color 0.2s, transform 0.25s;
}

.net-dash-cheer.is-pop {
    color: #ffe6a8;
    animation: net-dash-cheer-pop 0.45s ease;
}

.net-dash-xp {
    margin-bottom: 10px;
}

.net-dash-xp-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(232, 184, 74, 0.22);
    overflow: hidden;
}

.net-dash-xp-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #c4892a, #e8b84a 55%, #f5d57a);
    box-shadow: 0 0 10px rgba(232, 184, 74, 0.35);
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.net-dash-xp-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 10px;
    color: #b7c6d4;
    font-variant-numeric: tabular-nums;
}

.net-dash-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.net-dash-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 10px;
    background: rgba(18, 26, 36, 0.72);
    border: 1px solid rgba(126, 184, 218, 0.16);
    transition: transform 0.2s ease, border-color 0.2s, background 0.2s;
}

.net-dash-card.is-bump {
    animation: net-dash-card-bump 0.42s cubic-bezier(0.2, 1.35, 0.4, 1);
    border-color: rgba(232, 184, 74, 0.55);
    background: rgba(48, 40, 18, 0.55);
}

.net-dash-ico {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(126, 184, 218, 0.12);
    color: #8ec4e0;
    font-size: 12px;
}

.net-dash-card[data-stat-key="combo"] .net-dash-ico {
    background: rgba(232, 184, 74, 0.16);
    color: #e8b84a;
}

.net-dash-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.net-dash-num {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
    color: #f0f6fb;
    font-variant-numeric: tabular-nums;
}

.net-dash-num.is-tick {
    animation: net-dash-num-tick 0.35s ease;
}

.net-dash-label {
    font-size: 10px;
    color: #9eb0c0;
}

.net-dash-tip-btn {
    margin-top: 10px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(232, 184, 74, 0.45);
    border-radius: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(232, 184, 74, 0.22), rgba(109, 179, 168, 0.16));
    color: #ffe6a8;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, filter 0.15s;
}

.net-dash-tip-btn:hover:not(:disabled) {
    border-color: rgba(232, 184, 74, 0.7);
    filter: brightness(1.06);
}

.net-dash-tip-btn:disabled {
    opacity: 0.72;
    cursor: wait;
}

.net-dash-tip-btn.is-loading .net-dash-tip-btn-label {
    opacity: 0.75;
}

.net-dash-tip-spinner.hidden {
    display: none;
}

.net-dash-tips {
    margin-top: 10px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(12, 18, 26, 0.55);
    border: 1px solid rgba(126, 184, 218, 0.18);
}

.net-dash-tips.hidden {
    display: none;
}

.net-dash-tips-theme {
    font-size: 11px;
    color: #e8b84a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.net-dash-tips-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 260px;
    overflow-y: auto;
}

.net-dash-tip-item {
    padding: 8px 9px;
    border-radius: 8px;
    background: rgba(30, 40, 54, 0.9);
    border: 1px solid rgba(126, 184, 218, 0.14);
}

.net-dash-tip-eng {
    font-size: 13px;
    font-weight: 700;
    color: #f0f6fb;
    line-height: 1.3;
}

.net-dash-tip-zh {
    margin-top: 2px;
    font-size: 11px;
    color: #b7c6d4;
    line-height: 1.35;
}

.net-dash-tip-meta {
    margin-top: 4px;
    font-size: 10px;
    color: #8fa3b5;
    line-height: 1.35;
}

.net-dash-tip-actions {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
}

.net-dash-tip-add {
    border: 1px solid rgba(109, 179, 168, 0.4);
    background: rgba(109, 179, 168, 0.14);
    color: #9ad7c8;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    cursor: pointer;
}

.net-dash-tip-add:hover {
    background: rgba(109, 179, 168, 0.24);
    color: #d7f3ea;
}

.net-tip-dialog {
    width: min(520px, 100%);
}

.net-tip-theme {
    margin: 0 0 10px;
    font-size: 13px;
    color: #9ad7c8;
    line-height: 1.4;
    min-height: 1.2em;
}

.net-tip-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 36px 12px;
    color: #b7c6d4;
    font-size: 14px;
}

.net-tip-loading.hidden,
.net-tip-empty.hidden {
    display: none;
}

.net-tip-empty {
    padding: 28px 12px;
    text-align: center;
    color: #8fa3b5;
    font-size: 13px;
}

.net-tip-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(48vh, 420px);
    overflow-y: auto;
}

.net-tip-list:empty {
    display: none;
}

.net-tip-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(30, 40, 54, 0.9);
    border: 1px solid rgba(126, 184, 218, 0.14);
}

.net-tip-item-check {
    margin-top: 3px;
    flex-shrink: 0;
}

.net-tip-item-body {
    flex: 1;
    min-width: 0;
}

.net-tip-item-eng {
    font-size: 14px;
    font-weight: 700;
    color: #f0f6fb;
    line-height: 1.3;
}

.net-tip-item-zh {
    margin-top: 2px;
    font-size: 12px;
    color: #b7c6d4;
    line-height: 1.35;
}

.net-tip-item-meta {
    margin-top: 4px;
    font-size: 11px;
    color: #8fa3b5;
    line-height: 1.35;
}

.net-tip-item-quote {
    flex-shrink: 0;
    align-self: center;
}

.net-dash-burst {
    pointer-events: none;
    position: absolute;
    inset: 0;
}

.net-dash-burst span {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c, #e8b84a);
    opacity: 0;
    animation: net-dash-spark 0.7s ease-out forwards;
}

.net-help-details {
    margin-top: 8px;
    margin-bottom: 4px;
    padding-top: 10px;
    border-top: 1px dashed var(--net-border);
}

@keyframes net-dash-card-bump {
    0% { transform: scale(1); }
    35% { transform: scale(1.06); }
    100% { transform: scale(1); }
}

@keyframes net-dash-num-tick {
    0% { transform: translateY(4px); opacity: 0.35; }
    55% { transform: translateY(-2px); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes net-dash-cheer-pop {
    0% { transform: translateY(3px); opacity: 0.4; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes net-dash-level-pop {
    0% { transform: scale(0.88) rotate(-4deg); }
    45% { transform: scale(1.12) rotate(3deg); }
    100% { transform: scale(1) rotate(0); }
}

@keyframes net-dash-spark {
    0% { transform: translate(0, 0) scale(0.4); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

.net-sidebar-details {
    margin-bottom: 16px;
}

.net-sidebar-summary {
    list-style: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--net-accent);
    letter-spacing: 0.05em;
    font-weight: 600;
    opacity: 0.95;
    padding: 4px 0;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.net-sidebar-summary::-webkit-details-marker {
    display: none;
}

.net-fold-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--net-surface-raised);
    border: 1px solid var(--net-border-strong);
    color: var(--net-primary);
    font-size: 10px;
    transition: transform 0.18s ease, background 0.15s, border-color 0.15s, color 0.15s;
}

.net-sidebar-summary:hover .net-fold-icon {
    background: var(--net-primary-dim);
    border-color: rgba(126, 184, 218, 0.45);
    color: var(--net-text);
}

.net-sidebar-details[open] > .net-sidebar-summary .net-fold-icon {
    transform: rotate(90deg);
    background: rgba(109, 179, 168, 0.14);
    border-color: rgba(109, 179, 168, 0.35);
    color: var(--net-accent);
}

.net-md-details {
    margin-bottom: 14px;
}

.net-md-details .net-md-panel {
    margin-top: 10px;
    margin-bottom: 0;
}

.net-sidebar-details .net-shortcut-list {
    margin-top: 8px;
    margin-bottom: 0;
}

.net-sidebar-details .net-sidebar-note {
    margin-top: 8px;
    margin-bottom: 10px;
}

.net-sidebar-details .net-template-grid {
    margin-top: 0;
    margin-bottom: 0;
}

.net-sidebar-details .net-collect-list {
    margin-top: 0;
}

.net-sidebar-details .net-collect-pager {
    margin-bottom: 0;
}

.net-sidebar-details .net-history-list {
    margin-top: 0;
}

.net-history-details > .net-sidebar-summary .net-sync-status {
    width: 20px;
    height: 20px;
    font-size: 10px;
}

.net-shortcut-list {
    list-style: none;
    font-size: 12px;
    line-height: 1.85;
    color: var(--net-text-body);
    margin-bottom: 16px;
}

.net-shortcut-list kbd {
    display: inline-block;
    min-width: 52px;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--net-surface-raised);
    border: 1px solid var(--net-border-strong);
    color: var(--net-primary);
    font-size: 10px;
    text-align: center;
    margin-right: 6px;
}

.net-template-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.net-template-btn {
    border: 1px solid var(--net-border);
    background: var(--net-surface-raised);
    color: var(--net-text-body);
    border-radius: 8px;
    padding: 8px 10px 8px 8px;
    cursor: pointer;
    font-size: 11px;
    text-align: left;
    transition: background 0.2s, border-color 0.2s, filter 0.2s;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 8px;
}

.net-template-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--tpl-color, var(--net-accent));
    box-shadow: 0 0 6px var(--tpl-color, var(--net-accent));
}

.net-template-btn:hover {
    filter: brightness(1.08);
    border-color: var(--tpl-border, rgba(109, 179, 168, 0.45));
}

.net-template-btn .tag {
    display: none;
}

.net-collect-list {
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid var(--net-border);
    border-radius: 8px;
    background: var(--net-input-bg);
    margin-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(126, 184, 218, 0.42) rgba(30, 40, 52, 0.65);
}

.net-collect-list::-webkit-scrollbar {
    width: 7px;
}

.net-collect-list::-webkit-scrollbar-track {
    background: rgba(30, 40, 52, 0.55);
    border-radius: 0 8px 8px 0;
}

.net-collect-list::-webkit-scrollbar-thumb {
    background: rgba(126, 184, 218, 0.35);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.net-collect-list::-webkit-scrollbar-thumb:hover {
    background: rgba(109, 179, 168, 0.52);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.net-collect-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--net-border);
    cursor: pointer;
    transition: background 0.15s;
}

.net-collect-item:last-child {
    border-bottom: none;
}

.net-collect-item:hover {
    background: var(--net-primary-dim);
}

.net-collect-item-body {
    flex: 1;
    min-width: 0;
}

.net-collect-item-eng {
    font-size: 14px;
    font-weight: 600;
    color: var(--net-text);
    line-height: 1.4;
}

.net-collect-item-zh {
    font-size: 12px;
    color: var(--net-text-muted);
    margin-top: 3px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.net-collect-empty {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--net-text-muted);
}

.net-collect-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 0;
}

.net-collect-page-btn {
    padding: 4px 10px;
    font-size: 11px;
}

.net-collect-page-info {
    font-size: 11px;
    color: var(--net-text-muted);
    min-width: 72px;
    text-align: center;
}

.net-sync-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    flex-shrink: 0;
}

.net-sync-status.is-idle {
    color: var(--net-text-muted);
    background: rgba(122, 141, 158, 0.15);
}

.net-sync-status.is-synced {
    color: #6ee7b7;
    background: rgba(16, 120, 90, 0.22);
}

.net-sync-status.is-pending {
    color: #fbbf24;
    background: rgba(180, 120, 20, 0.22);
}

.net-history-list {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--net-border);
    border-radius: 8px;
    background: var(--net-input-bg);
}

.net-history-list::-webkit-scrollbar {
    width: 6px;
}

.net-history-list::-webkit-scrollbar-thumb {
    background: rgba(126, 184, 218, 0.25);
    border-radius: 6px;
}

.net-history-empty {
    padding: 16px 12px;
    text-align: center;
    color: var(--net-text-muted);
    font-size: 12px;
}

.net-history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(126, 184, 218, 0.08);
}

.net-history-item:last-child {
    border-bottom: none;
}

.net-history-item.is-current {
    background: rgba(126, 184, 218, 0.08);
}

.net-history-body {
    flex: 1;
    min-width: 0;
}

.net-history-label {
    font-size: 12px;
    color: var(--net-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.net-history-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.net-history-time {
    font-size: 10px;
    color: var(--net-text-muted);
}

.net-history-synced,
.net-history-pending {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    line-height: 1;
}

.net-history-synced {
    color: #6ee7b7;
}

.net-history-synced i {
    font-size: 10px;
}

.net-history-pending {
    color: #fbbf24;
}

.net-history-pending i {
    font-size: 9px;
}

.net-history-restore {
    border: 1px solid var(--net-border-strong);
    background: transparent;
    color: var(--net-text-muted);
    border-radius: 8px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.net-history-restore:hover:not(:disabled) {
    color: var(--net-primary);
    border-color: rgba(126, 184, 218, 0.45);
    background: rgba(126, 184, 218, 0.12);
}

.net-history-restore:disabled {
    opacity: 0.35;
    cursor: default;
}

.net-edit-batch-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px 10px;
    border: 1px solid var(--net-border);
    border-radius: 8px;
    background: rgba(38, 50, 64, 0.45);
}

.net-edit-batch-bar.hidden {
    display: none;
}

.net-edit-check-all-label {
    font-size: 12px;
    color: var(--net-text-body);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.net-edit-result-check {
    flex-shrink: 0;
    margin-top: 3px;
    accent-color: var(--net-primary);
}

.net-edit-batch-bar .net-btn.primary {
    padding: 5px 12px;
    font-size: 11px;
}

.net-md-panel {
    margin-bottom: 14px;
}

.net-md-textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    border: 1px solid var(--net-border-strong);
    background: var(--net-input-bg);
    color: var(--net-text-body);
    border-radius: 8px;
    padding: 8px;
    font-size: 11px;
    font-family: Consolas, 'Courier New', monospace;
    line-height: 1.45;
    outline: none;
}

.net-md-textarea:focus {
    border-color: rgba(126, 184, 218, 0.4);
    box-shadow: 0 0 0 2px rgba(126, 184, 218, 0.1);
}

.net-hint {
    font-size: 11px;
    line-height: 1.55;
    color: var(--net-text-muted);
}

.net-sidebar-details .net-hint {
    border-top: none;
    padding-top: 0;
    margin-bottom: 0;
}

.net-hint code {
    font-size: 10px;
    color: var(--net-primary);
}

.net-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--net-surface-solid);
    border: 1px solid var(--net-border-strong);
    color: var(--net-text);
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 13px;
    z-index: 200;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
    box-shadow: var(--net-shadow);
}

.net-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.net-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 34, 45, 0.75);
    color: var(--net-primary);
    font-size: 14px;
    z-index: 10;
}

.net-loading.hidden {
    display: none;
}

.net-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.net-edit-modal.show {
    display: flex;
}

.net-edit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 18, 26, 0.72);
    backdrop-filter: blur(6px);
}

.net-edit-dialog {
    position: relative;
    width: min(580px, 100%);
    max-height: min(88vh, 740px);
    display: flex;
    flex-direction: column;
    background: var(--net-surface-solid);
    border: 1px solid var(--net-border-strong);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.net-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--net-border);
    background: rgba(38, 50, 64, 0.5);
}

.net-edit-header h3 {
    font-size: 15px;
    color: var(--net-text);
    font-weight: 600;
}

.net-edit-close {
    border: none;
    background: transparent;
    color: var(--net-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
}

.net-edit-close:hover {
    background: var(--net-primary-dim);
    color: var(--net-text);
}

.net-edit-body {
    padding: 14px 16px;
    overflow-y: auto;
    flex: 1;
}

.net-edit-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: flex-start;
}

.net-edit-search-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.net-edit-search-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--net-border-strong);
    background: var(--net-input-bg);
    color: var(--net-text);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    outline: none;
}

.net-edit-search-input:focus {
    border-color: rgba(126, 184, 218, 0.4);
    box-shadow: 0 0 0 2px rgba(126, 184, 218, 0.1);
}

.net-edit-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    margin: 0;
    padding: 4px;
    list-style: none;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--net-border-strong);
    border-radius: 10px;
    background: var(--net-panel, var(--net-input-bg));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.net-edit-suggest.hidden {
    display: none;
}

.net-edit-suggest-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--net-text);
}

.net-edit-suggest-item:hover,
.net-edit-suggest-item.is-active {
    background: rgba(126, 184, 218, 0.16);
}

.net-edit-suggest-eng {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.net-edit-suggest-meta {
    font-size: 11px;
    color: var(--net-text-muted);
    line-height: 1.3;
}

.net-edit-suggest-zh {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.net-edit-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.net-edit-filter-tabs.hidden {
    display: none;
}

.net-edit-filter-tab {
    border: 1px solid var(--net-border-strong);
    background: transparent;
    color: var(--net-text-muted);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    line-height: 1.2;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.net-edit-filter-tab:hover {
    color: var(--net-text);
    border-color: rgba(126, 184, 218, 0.45);
}

.net-edit-filter-tab.is-active {
    color: #e8f4fc;
    background: rgba(126, 184, 218, 0.22);
    border-color: rgba(126, 184, 218, 0.55);
}

.net-edit-filter-count {
    margin-left: 4px;
    opacity: 0.75;
    font-variant-numeric: tabular-nums;
}

.net-edit-results {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 14px;
    border: 1px solid var(--net-border);
    border-radius: 8px;
    background: var(--net-input-bg);
}

.net-edit-results:empty {
    display: none;
}

.net-edit-result-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--net-border);
    cursor: pointer;
    transition: background 0.15s;
}

.net-edit-result-item:last-child {
    border-bottom: none;
}

.net-edit-result-item:hover {
    background: var(--net-primary-dim);
}

.net-edit-result-body {
    flex: 1;
    min-width: 0;
}

.net-edit-result-eng {
    font-size: 13px;
    font-weight: 600;
    color: var(--net-text);
}

.net-edit-result-zh {
    font-size: 11px;
    color: var(--net-text-muted);
    margin-top: 2px;
    line-height: 1.4;
}

.net-edit-result-quote {
    flex-shrink: 0;
    border: 1px solid rgba(109, 179, 168, 0.35);
    background: var(--net-accent-dim);
    color: var(--net-accent);
    border-radius: 14px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
}

.net-edit-result-quote:hover {
    background: rgba(109, 179, 168, 0.22);
}

.net-edit-results-empty {
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--net-text-muted);
}

.net-edit-fields label {
    display: block;
    font-size: 11px;
    color: var(--net-primary);
    margin-bottom: 4px;
    opacity: 0.85;
}

.net-edit-fields label + label {
    margin-top: 10px;
}

.net-edit-eng,
.net-edit-zh {
    width: 100%;
    border: 1px solid var(--net-border-strong);
    background: var(--net-input-bg);
    color: var(--net-text-body);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.net-edit-eng:focus,
.net-edit-zh:focus {
    border-color: rgba(126, 184, 218, 0.4);
    box-shadow: 0 0 0 2px rgba(126, 184, 218, 0.1);
}

.net-edit-zh {
    resize: vertical;
    min-height: 64px;
    line-height: 1.45;
}

.net-edit-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--net-border);
    background: rgba(28, 38, 50, 0.5);
}

.mm-play {
    cursor: pointer;
}

.mm-play .mm-play-hit {
    cursor: pointer;
}

.mm-play .mm-play-icon,
.mm-play circle:not(.mm-play-hit) {
    pointer-events: none;
}

.net-edit-play-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(126, 184, 218, 0.35);
    background: rgba(90, 130, 160, 0.25);
    color: var(--net-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 10px;
}

.net-edit-play-btn:hover {
    background: rgba(100, 150, 180, 0.4);
    color: var(--net-text);
}

.net-mobile-only {
    display: none !important;
}

.net-desktop-only {
    display: initial;
}

.net-icon-btn {
    border: 1px solid var(--net-border-strong);
    background: var(--net-surface-raised);
    color: var(--net-text-body);
    border-radius: 10px;
    width: 34px;
    height: 34px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.net-icon-btn:hover {
    background: var(--net-primary-dim);
    border-color: rgba(126, 184, 218, 0.35);
    color: var(--net-text);
}

.net-catalog-backdrop,
.net-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}

.net-mobile-pick-hint {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    color: var(--net-text-muted);
    pointer-events: none;
}

.net-mobile-pick-hint.hidden {
    display: none;
}

.net-mobile-pick-hint i {
    font-size: 36px;
    color: var(--net-primary);
    opacity: 0.75;
}

.net-mobile-pick-hint p {
    font-size: 14px;
    line-height: 1.5;
    max-width: 240px;
}

.net-mobile-pick-hint .net-btn {
    pointer-events: auto;
}

.net-map-empty-hint {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
    color: var(--net-text-muted);
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(18, 28, 40, 0.55) 0%, transparent 68%);
}

.net-map-empty-hint.hidden {
    display: none;
}

.net-map-empty-hint i {
    font-size: 32px;
    color: var(--net-primary);
    opacity: 0.8;
}

.net-map-empty-hint p {
    font-size: 14px;
    line-height: 1.5;
    max-width: 260px;
    margin: 0;
}

.net-map-empty-hint .net-btn {
    pointer-events: auto;
}

.net-map-empty-sub {
    font-size: 12px;
    opacity: 0.72;
}

.net-catalog-close {
    border: 1px solid var(--net-border-strong);
    background: transparent;
    color: var(--net-text-muted);
    border-radius: 8px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.net-catalog-close:hover {
    color: var(--net-text);
    background: rgba(126, 184, 218, 0.12);
}

@media (max-width: 900px) {
    :root {
        --net-topbar-h: 44px;
    }

    body.is-net-mobile {
        overflow: hidden;
    }

    .net-mobile-only {
        display: inline-flex !important;
    }

    .net-desktop-only {
        display: none !important;
    }

    .net-topbar {
        padding: 6px 10px;
        gap: 6px;
        min-height: var(--net-topbar-h);
    }

    .net-topbar h1 {
        font-size: 14px;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-right: 0;
    }

    .net-back-word {
        padding: 6px 10px;
    }

    .net-back-label {
        display: none;
    }

    .net-topbar-actions-wrap {
        display: none;
        position: fixed;
        top: calc(var(--net-topbar-h) + 6px);
        right: 10px;
        left: 10px;
        z-index: 230;
        max-width: 320px;
        margin-left: auto;
    }

    .net-topbar.is-tools-open .net-topbar-actions-wrap {
        display: block;
    }

    .net-topbar-actions-wrap .net-btn-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px;
        border-radius: 12px;
        border: 1px solid var(--net-border-strong);
        background: rgba(32, 42, 56, 0.98);
        box-shadow: var(--net-shadow);
    }

    .net-topbar-actions-wrap .net-btn {
        width: 100%;
        justify-content: flex-start;
    }

    .net-layout {
        top: var(--net-topbar-h);
        flex-direction: row;
        --net-catalog-w: 0px;
        --net-sidebar-w: 0px;
    }

    .net-rail-toggle {
        display: none;
    }

    .net-catalog-panel {
        position: fixed;
        top: var(--net-topbar-h);
        left: 0;
        bottom: 0;
        width: min(88vw, 320px);
        max-height: none;
        z-index: 210;
        transform: translateX(-105%);
        opacity: 1;
        pointer-events: auto;
        border-right: 1px solid var(--net-border);
        border-bottom: none;
        transition: transform 0.24s ease;
    }

    .net-layout.is-catalog-open .net-catalog-panel {
        transform: translateX(0);
    }

    .net-layout.is-left-collapsed .net-catalog-panel {
        transform: translateX(-105%);
    }

    .net-catalog-backdrop {
        display: block;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .net-layout.is-catalog-open .net-catalog-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .net-sidebar {
        position: fixed;
        top: var(--net-topbar-h);
        right: 0;
        bottom: 0;
        width: min(92vw, 360px);
        max-height: none;
        z-index: 210;
        transform: translateX(105%);
        opacity: 1;
        pointer-events: auto;
        border-left: 1px solid var(--net-border);
        border-top: none;
        transition: transform 0.24s ease;
        overflow-y: auto;
    }

    .net-layout.is-sidebar-open .net-sidebar {
        transform: translateX(0);
    }

    .net-layout.is-right-collapsed .net-sidebar {
        transform: translateX(105%);
        max-height: none;
        padding-bottom: 0;
    }

    .net-sidebar-backdrop {
        display: block;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .net-layout.is-sidebar-open .net-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .net-map-area {
        flex: 1;
        min-height: 0;
        width: 100%;
    }

    #mindmap-svg {
        touch-action: none;
    }

    .net-sidebar .net-collect-list {
        max-height: 220px;
    }

    .net-sidebar .net-history-list {
        max-height: 200px;
    }

    .net-edit-dialog {
        width: min(96vw, 480px);
        max-height: 92vh;
    }
}

.mm-img-fo {
    overflow: visible;
}

.mm-img-toggle-fo {
    overflow: visible;
}

.mm-img-toggle-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.mm-img-toggle {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid rgba(126, 184, 218, 0.42);
    border-top: none;
    background: rgba(32, 42, 56, 0.98);
    color: var(--net-text-muted);
    border-radius: 0 0 10px 10px;
    padding: 0 10px;
    font-size: 10px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.mm-img-toggle:hover {
    color: #d7ebf7;
    border-color: rgba(126, 184, 218, 0.62);
    background: rgba(42, 56, 74, 0.98);
}

.mm-node-imgs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-content: flex-start;
}

.mm-node-img {
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid rgba(126, 184, 218, 0.22);
    background: rgba(0, 0, 0, 0.35);
    cursor: zoom-in;
    display: block;
    transition: border-color 0.15s, transform 0.15s;
}

.mm-node-img:hover {
    border-color: rgba(126, 184, 218, 0.55);
    transform: scale(1.02);
}

.mm-node-img-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
    font-size: 50px;
    line-height: 1;
    border: none;
    background: transparent;
    cursor: default;
    user-select: none;
}
.mm-node-img-emoji:hover {
    transform: none;
    border-color: transparent;
}

.net-edit-search-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.net-edit-search-pager.hidden {
    display: none;
}

.net-edit-page-btn {
    padding: 4px 10px;
    font-size: 11px;
}

.net-edit-page-info {
    font-size: 11px;
    color: var(--net-text-muted);
    min-width: 72px;
    text-align: center;
}

.net-settings-dialog {
    max-width: 420px;
    width: min(420px, 100%);
    max-height: min(88vh, 640px);
}

.net-settings-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--net-text);
    cursor: pointer;
    margin-bottom: 10px;
}

.net-settings-option input {
    margin-top: 3px;
    flex-shrink: 0;
}

.net-img-lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.net-img-lightbox.show {
    display: flex;
}

.net-img-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(4px);
}

.net-img-lightbox img {
    position: relative;
    z-index: 1;
    max-width: min(92vw, 960px);
    max-height: 88vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.net-img-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
}

.net-img-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.65);
}
