/* Whiteboard page */



.work-tools button,
.intel-form button,
.flow-picks button,
.board-bar button {
    appearance: none;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #141416;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
}



.work-tools button.is-on,
.flow-picks button.is-on,
.board-bar button.is-on {
    border-color: #155e75;
    color: var(--accent);
    background: #083344;
}



.board-bar {
    position: absolute;
    z-index: 4;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}



.board-bar > * { pointer-events: auto; }



.board-types,
.board-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(9, 9, 11, 0.92);
}



.board-bar button {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
}


.board-bar .board-ico {
    width: 34px;
    padding: 0;
    display: inline-grid;
    place-items: center;
}


.board-bar .board-ico svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linejoin: round;
    stroke-linecap: round;
}


.board-bar .board-ico-fill svg { fill: currentColor; stroke: none; }


.board-inspect {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    padding: 4px 6px;
    border: 1px solid #155e75;
    border-radius: 10px;
    background: rgba(8, 51, 68, 0.94);
}


.board-inspect[hidden] { display: none !important; }


.board-inspect span {
    padding: 0 6px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}


.board-inspect .board-size {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
}


.board-inspect .board-size input {
    width: 56px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #09090b;
    color: var(--text);
    font: inherit;
    font-size: 12px;
}



.board-hint {
    margin: 0;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(8, 51, 68, 0.92);
    color: var(--accent);
    font-size: 12px;
}



.board-hint[hidden],
.page-whiteboard .board-hint { display: none !important; }


.board-seg button.danger { color: #fca5a5; }



.page-whiteboard { background: #09090b; }


.page-whiteboard .work-top { display: none; }


.board-view.is-pan { cursor: grab; }


.board-view.is-select { cursor: crosshair; }


.board-view.is-select .wb-node.is-on:not(.is-locked) { cursor: grab; }


.board-view.is-pan:active,
.board-view.is-grabbing,
.board-view.is-grabbing .wb-node { cursor: grabbing !important; }


.board-view.is-plain {
    background-image: none;
}



.board-toolbar {
    position: absolute;
    z-index: 6;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    max-width: calc(100% - 24px);
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(12, 12, 14, 0.94);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
    isolation: isolate;
    overflow: visible;
    user-select: none;
    -webkit-user-select: none;
}


.board-tool-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #27272a;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: left 0.34s cubic-bezier(0.22, 1, 0.36, 1), top 0.34s cubic-bezier(0.22, 1, 0.36, 1), width 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}


.board-tool-thumb.is-instant { transition: none; }


.board-toolbar button {
    appearance: none;
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: color 0.22s ease, background 0.22s ease;
}


.board-toolbar button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linejoin: round;
    stroke-linecap: round;
}


.board-preset-card {
    width: min(560px, 100%);
    max-height: min(88vh, 680px);
    background: #0b0b0d;
}


.board-preset-card .help-top { padding: 22px 22px 14px; align-items: center; }


.board-preset-card h2 {
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -0.04em;
}


.board-preset-card .help-lead {
    margin-top: 6px;
    font-size: 13px;
    color: #71717a;
    line-height: 1.45;
}


.board-preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 8px 16px 22px;
}


.board-preset-grid button {
    appearance: none;
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px;
    border: 1px solid #27272a;
    border-radius: 12px;
    background: #111113;
    color: #fafafa;
    cursor: pointer;
}


.board-preset-grid button:hover {
    border-color: #3f3f46;
    background: #18181b;
}


.board-preset-grid svg {
    display: block;
    width: 100%;
    height: 76px;
    margin-bottom: 10px;
    fill: none;
    stroke: #a1a1aa;
    stroke-width: 1.4;
    stroke-linejoin: round;
    stroke-linecap: round;
}


.board-preset-grid b {
    display: block;
    font-size: 13px;
    font-weight: 650;
}


.board-preset-grid small {
    display: block;
    margin-top: 4px;
    color: #71717a;
    font-size: 12px;
    line-height: 1.4;
}


@media (max-width: 640px) {
    .board-preset-grid { grid-template-columns: 1fr; }
}


.board-toolbar .board-ico-fill svg { fill: currentColor; stroke: none; }


.board-toolbar .board-ico-type svg {
    fill: currentColor;
    stroke: none;
}


.board-toolbar .board-ico-type text {
    fill: currentColor;
    stroke: none;
}


.board-toolbar button:hover { background: #18181b; color: var(--text); }


.board-toolbar button.is-on {
    background: #27272a;
    color: var(--text);
}


.board-toolbar [data-board-tool].is-on,
.board-toolbar [data-board-tool].is-on:hover {
    background: transparent;
    color: var(--text);
}


.board-toolbar:not(:has(.board-tool-thumb)) [data-board-tool].is-on {
    background: #27272a;
}


.board-toolbar .board-rule {
    width: 1px;
    height: 18px;
    margin: 0 4px;
    background: var(--line);
}

.board-toolbar > button[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    top: calc(100% + 6px);
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 6px;
    background: #18181b;
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    z-index: 8;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.board-toolbar > button[data-tip]:hover::after,
.board-toolbar > button[data-tip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
}



.board-props {
    position: absolute;
    z-index: 6;
    top: 68px;
    left: 14px;
    width: 196px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(12, 12, 14, 0.96);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
    user-select: none;
    -webkit-user-select: none;
}


.board-props[hidden] { display: none !important; }


.board-props b {
    display: block;
    margin: 10px 0 6px;
    color: var(--faint);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.board-props b:first-child { margin-top: 0; }


.board-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}


.board-swatch {
    appearance: none;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    cursor: pointer;
}


.board-swatch.is-on { box-shadow: 0 0 0 2px #09090b, 0 0 0 3.5px var(--accent); }


.board-swatch.is-none {
    background:
        linear-gradient(45deg, transparent 46%, #f87171 46%, #f87171 54%, transparent 54%),
        repeating-conic-gradient(#27272a 0 25%, #18181b 0 50%);
    background-size: 100% 100%, 8px 8px;
}


.board-seg {
    display: flex;
    gap: 4px;
}


.board-seg button {
    appearance: none;
    flex: 1;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: #18181b;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
}


.board-seg button.is-on,
.board-seg button:hover { background: #27272a; color: var(--text); }


.board-props input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}



.board-more {
    position: absolute;
    z-index: 7;
    top: 58px;
    left: 50%;
    width: 248px;
    max-height: min(72vh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(12, 12, 14, 0.97);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}


.board-more[hidden] { display: none !important; }


.board-more button,
.board-more select {
    appearance: none;
    width: 100%;
    min-height: 36px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    text-align: left;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}


.board-more button:hover { background: #18181b; }


.board-more select { background: #141416; height: 34px; margin: 4px 0 2px; }


.board-more .board-mi {
    width: 16px;
    height: 16px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.board-more button > span { min-width: 0; flex: 1; }


.board-more kbd {
    margin-left: auto;
    color: var(--faint);
    font-size: 11px;
    font-family: inherit;
    font-weight: 500;
}


.board-more .board-ai {
    margin-left: auto;
    font-style: normal;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #67e8f9;
    border: 1px solid #155e75;
    background: rgba(103, 232, 249, 0.08);
    border-radius: 999px;
    padding: 2px 6px;
}


.board-more button kbd + .board-ai,
.board-more button .board-ai + kbd { margin-left: 8px; }


.board-more-label {
    padding: 10px 10px 4px;
    color: var(--faint);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.board-more hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 6px 8px;
}


.board-view.is-laser,
.board-view.is-lasso,
.board-view.is-bucket { cursor: crosshair; }


.wb-overlay {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    overflow: visible;
}


.wb-overlay .wb-lasso {
    fill: rgba(103, 232, 249, 0.1);
    stroke: var(--accent);
    stroke-width: 1.25;
    stroke-dasharray: 5 4;
    stroke-linejoin: round;
}


.wb-overlay .wb-marquee {
    fill: rgba(228, 228, 231, 0.08);
    stroke: #e4e4e7;
    stroke-width: 1.25;
    stroke-dasharray: 5 4;
    stroke-linejoin: round;
}


.wb-group {
    position: absolute;
    z-index: 6;
    pointer-events: none;
    box-sizing: border-box;
    border: 1.5px solid #e4e4e7;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(9, 9, 11, 0.55);
    background: rgba(250, 250, 250, 0.03);
}


.wb-group i {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fafafa;
    border: 1px solid #09090b;
    box-sizing: border-box;
}


.wb-group i:nth-child(1) { left: -4px; top: -4px; }
.wb-group i:nth-child(2) { right: -4px; top: -4px; }
.wb-group i:nth-child(3) { right: -4px; bottom: -4px; }
.wb-group i:nth-child(4) { left: -4px; bottom: -4px; }


.wb-overlay .wb-laser {
    fill: none;
    stroke: #fda4af;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(253, 164, 175, 0.85));
}


.wb-overlay .wb-laser-head {
    fill: #fda4af;
    stroke: none;
    filter: drop-shadow(0 0 8px #fda4af);
}


.wb-node.is-embed .wb-face { padding: 8px; }


.wb-node.is-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 6px;
    background: #111113;
    pointer-events: none;
}


.wb-node.is-embed.is-on iframe { pointer-events: auto; }


.wb-node[data-shape="frame"] .wb-copy {
    justify-content: flex-start;
    align-items: flex-start;
}


.wb-node[data-shape="frame"] .wb-text h3 {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}


.wb-node[data-shape="frame"] .wb-geo .wb-shape {
    fill: var(--wb-fill, rgba(250,250,250,0.04));
}



.board-view {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    touch-action: none;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    background-color: #09090b;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(250, 250, 250, 0.055) 1px, transparent 0);
    background-size: 22px 22px;
    background-position: var(--wb-bgx, 0px) var(--wb-bgy, 0px);
    transition: background-position 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}


.board-shift {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate3d(var(--wb-px, 0px), var(--wb-py, 0px), 0);
    will-change: transform;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}


.board-shift .board-stage { pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {

        .board-shift { transform: none !important; transition: none; }
}


html.reduce-motion .board-shift { transform: none !important; transition: none; }


.board-view.is-connect,
.board-view.is-draw,
.board-view.is-erase,
.board-view.is-laser,
.board-view.is-lasso,
.board-view.is-bucket { cursor: crosshair; }


.board-empty {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-content: center;
    gap: 8px;
    text-align: center;
    pointer-events: none;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    padding: 108px 24px 24px;
}


.board-empty strong { color: var(--text); font-size: 16px; }


.board-empty[hidden] { display: none !important; }


.board-stage {
    position: absolute;
    left: 0;
    top: 0;
    width: 4800px;
    height: 3600px;
    transform-origin: 0 0;
}


.wb-node {
    position: absolute;
    width: var(--wb-w, 200px);
    height: var(--wb-h, 72px);
    padding: 0;
    border: 0;
    background: transparent;
    cursor: grab;
    user-select: none;
    color: var(--text);
    overflow: visible;
    opacity: var(--wb-op, 1);
    z-index: 2;
    pointer-events: auto;
}


.wb-node.is-locked { cursor: default; }


.wb-node.is-flip-x .wb-geo,
.wb-node.is-flip-x .wb-face { transform: scaleX(-1); }


.wb-node.is-flip-y .wb-geo,
.wb-node.is-flip-y .wb-face { transform: scaleY(-1); }


.wb-node.is-flip-x.is-flip-y .wb-geo,
.wb-node.is-flip-x.is-flip-y .wb-face { transform: scale(-1, -1); }


.wb-face {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 10px 12px;
    border: 1px solid var(--wb-stroke, var(--line));
    background: var(--wb-fill, #111113);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.wb-copy { position: relative; z-index: 1; min-width: 0; pointer-events: auto; }


.wb-text {
    outline: none;
    width: 100%;
    min-height: 1.15em;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text);
}


.wb-text h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
}


.wb-text p {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: var(--muted);
}


.wb-text.is-edit {
    cursor: text;
    color: var(--text);
    caret-color: var(--accent);
}


.wb-node.is-editing,
.wb-node.is-editing .wb-copy { cursor: text; }


.wb-geo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--wb-stroke, #e4e4e7);
    overflow: visible;
    pointer-events: auto;
}


.wb-node.is-geo {
    pointer-events: none;
}


.wb-node.is-geo .wb-copy,
.wb-node.is-geo .wb-handles,
.wb-node.is-geo .wb-port,
.wb-node.is-geo .wb-handle {
    pointer-events: auto;
}


.wb-node.is-geo .wb-geo {
    pointer-events: none;
}


.wb-node.is-geo .wb-face {
    pointer-events: none;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
}


.wb-geo .wb-shape,
.wb-geo .wb-fold {
    pointer-events: visiblePainted;
}


.wb-node.is-text .wb-face {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 4px 6px;
}


.wb-node.is-sticky .wb-face {
    justify-content: flex-start;
    padding: 22px 14px 14px;
    border: 0;
    border-radius: 2px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 22%),
        var(--wb-fill, #f3e08a);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 10px 22px rgba(0, 0, 0, 0.4),
        0 1px 0 #c9a227;
}


.wb-node.is-sticky .wb-face::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 46px;
    height: 11px;
    margin-left: -23px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
    transform: rotate(-2deg);
    pointer-events: none;
}


.wb-node.is-sticky .wb-copy {
    height: 100%;
}


.wb-node.is-sticky .wb-text,
.wb-node.is-sticky .wb-text h3,
.wb-node.is-sticky .wb-text p,
.wb-node.is-sticky .wb-text.is-edit {
    color: #292524;
    caret-color: #1c1917;
}


.wb-node.is-sticky .wb-text:empty::before {
    content: "Note";
    color: rgba(41, 37, 36, 0.38);
}


.wb-node.is-on.is-sticky .wb-face,
.wb-node.is-from.is-sticky .wb-face {
    border: 0;
    box-shadow:
        0 0 0 1.5px #e4e4e7,
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 12px 28px rgba(0, 0, 0, 0.48);
}


.wb-node.is-done.is-sticky .wb-face {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 22%),
        #d4e8a8;
    border: 0;
}


.wb-copy { pointer-events: auto; }


.wb-geo .wb-shape,
.wb-geo .wb-fold {
    fill: none;
    stroke: inherit;
    stroke-linecap: var(--wb-lc, round);
    stroke-linejoin: var(--wb-lj, round);
    stroke-width: calc((var(--wb-sw, 1.75) * 1px) / var(--wb-z, 1));
    stroke-dasharray: var(--wb-dash, none);
}


.wb-geo .wb-shape {
    fill: var(--wb-fill, none);
}


.wb-geo .wb-arrowhead {
    fill: var(--wb-stroke, #e4e4e7);
    stroke: none;
}


.wb-geo * {
    vector-effect: non-scaling-stroke;
    pointer-events: visiblePainted;
}


.wb-node.is-ink {
    pointer-events: none;
    overflow: visible;
}


.wb-node.is-ink .wb-shape {
    pointer-events: stroke;
}


.wb-node.is-stroke {
    background: transparent;
    pointer-events: none;
    overflow: visible;
}


.wb-node.is-stroke .wb-face { display: none; }


.wb-node.is-stroke .wb-geo,
.wb-node.is-stroke .wb-geo * {
    pointer-events: none;
}


.wb-node.is-stroke .wb-hit {
    fill: none;
    stroke: rgba(250, 250, 250, 0.01);
    stroke-width: 16;
    pointer-events: stroke !important;
}


.wb-node.is-stroke .wb-handles { pointer-events: none; inset: 0; }


.wb-node.is-stroke .wb-handle { pointer-events: auto; }


.wb-node.is-stroke .wb-handle:not([data-handle="start"]):not([data-handle="end"]) { display: none; }


.wb-stroke {
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}


.wb-handle[data-handle="start"],
.wb-handle[data-handle="end"] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: grab;
    transform: translate(-50%, -50%) scale(calc(1 / var(--wb-z, 1)));
}


.wb-node[data-shape="square"] .wb-copy,
.wb-node[data-shape="circle"] .wb-copy,
.wb-node[data-shape="ellipse"] .wb-copy,
.wb-node[data-shape="diamond"] .wb-copy,
.wb-node[data-shape="decision"] .wb-copy,
.wb-node[data-shape="process"] .wb-copy,
.wb-node[data-shape="terminator"] .wb-copy {
    text-align: center;
    padding: 8px;
}


.wb-node[data-shape="triangle"] .wb-copy {
    text-align: center;
    padding: 32% 14px 10px;
}


.wb-node[data-shape="line"] .wb-face,
.wb-node[data-shape="arrow"] .wb-face {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}


.wb-node[data-shape="line"] .wb-copy,
.wb-node[data-shape="arrow"] .wb-copy {
    display: none;
}


.wb-node[data-shape="draw"] .wb-face,
.wb-node.is-ink .wb-face {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}


.wb-node.is-ink .wb-copy { display: none; }


.wb-ink,
.wb-stroke { inset: 0; width: 100%; height: 100%; }


.wb-node[data-shape="line"] .wb-face,
.wb-node[data-shape="arrow"] .wb-face { pointer-events: none; }


.wb-node[data-shape="line"] .wb-geo .wb-shape,
.wb-node[data-shape="arrow"] .wb-geo .wb-shape,
.wb-node.is-ink .wb-geo .wb-shape {
    fill: none;
}


.wb-node.is-on .wb-face,
.wb-node.is-from .wb-face {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(0, 0, 0, 0.28);
}


.wb-node.is-on.is-geo .wb-face,
.wb-node.is-from.is-geo .wb-face,
.wb-node.is-on.is-text .wb-face,
.wb-node.is-from.is-text .wb-face { box-shadow: none; border: 0; }


.wb-node.is-on.is-geo .wb-geo,
.wb-node.is-from.is-geo .wb-geo,
.wb-node.is-on.is-stroke .wb-geo,
.wb-node.is-from.is-stroke .wb-geo { stroke: #fafafa; }


.wb-node.is-on.is-image.is-empty .wb-geo,
.wb-node.is-from.is-image.is-empty .wb-geo { stroke: #52525b; }


.wb-handles {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}


.wb-handle {
    position: absolute;
    width: 9px;
    height: 9px;
    border: 1px solid #09090b;
    border-radius: 1px;
    background: var(--accent);
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(calc(1 / var(--wb-z, 1)));
}


.wb-node.is-stroke {
    background: transparent;
    pointer-events: none;
}


.wb-node.is-stroke .wb-geo { pointer-events: none; }


.wb-node.is-stroke .wb-hit {
    fill: none;
    stroke: rgba(250, 250, 250, 0.01);
    stroke-width: 16;
    pointer-events: stroke;
}


.wb-node.is-stroke .wb-handles { pointer-events: none; inset: 0; }


.wb-node.is-stroke .wb-handle { pointer-events: auto; }


.wb-handle[data-handle="start"],
.wb-handle[data-handle="end"] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: grab;
    transform: translate(-50%, -50%) scale(calc(1 / var(--wb-z, 1)));
}


.board-view.is-snap .wb-port {
    opacity: 1;
    pointer-events: none;
}


.board-view.is-snap .wb-port.is-target {
    opacity: 1;
    background: var(--accent);
}


.wb-handle[data-handle="nw"] { left: 0; top: 0; cursor: nwse-resize; }


.wb-handle[data-handle="ne"] { left: 100%; top: 0; cursor: nesw-resize; }


.wb-handle[data-handle="se"] { left: 100%; top: 100%; cursor: nwse-resize; }


.wb-handle[data-handle="sw"] { left: 0; top: 100%; cursor: nesw-resize; }


.wb-ports {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}


.wb-port {
    position: absolute;
    z-index: 5;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fafafa;
    border: 1.5px solid #3f3f46;
    box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.65);
    pointer-events: none;
    cursor: crosshair;
    transform: translate(-50%, -50%) scale(calc(1 / var(--wb-z, 1)));
    opacity: 0;
}


.wb-port::after {
    content: "";
    position: absolute;
    inset: -10px;
}


.wb-port[data-port="n"] { left: 50%; top: 0; }


.wb-port[data-port="e"] { left: 100%; top: 50%; }


.wb-port[data-port="s"] { left: 50%; top: 100%; }


.wb-port[data-port="w"] { left: 0; top: 50%; }


.wb-node[data-shape="triangle"] .wb-port[data-port="n"] { left: 50%; top: 1.5%; }


.wb-node[data-shape="triangle"] .wb-port[data-port="e"] { left: 74.5%; top: 50%; }


.wb-node[data-shape="triangle"] .wb-port[data-port="s"] { left: 50%; top: 98.5%; }


.wb-node[data-shape="triangle"] .wb-port[data-port="w"] { left: 25.5%; top: 50%; }


.wb-node[data-shape="diamond"] .wb-port[data-port="n"],
.wb-node[data-shape="decision"] .wb-port[data-port="n"] { left: 50%; top: 1.5%; }


.wb-node[data-shape="diamond"] .wb-port[data-port="e"],
.wb-node[data-shape="decision"] .wb-port[data-port="e"] { left: 98.5%; top: 50%; }


.wb-node[data-shape="diamond"] .wb-port[data-port="s"],
.wb-node[data-shape="decision"] .wb-port[data-port="s"] { left: 50%; top: 98.5%; }


.wb-node[data-shape="diamond"] .wb-port[data-port="w"],
.wb-node[data-shape="decision"] .wb-port[data-port="w"] { left: 1.5%; top: 50%; }


.wb-node[data-shape="circle"] .wb-port[data-port="n"],
.wb-node[data-shape="ellipse"] .wb-port[data-port="n"] { left: 50%; top: 1.5%; }


.wb-node[data-shape="circle"] .wb-port[data-port="e"],
.wb-node[data-shape="ellipse"] .wb-port[data-port="e"] { left: 98.5%; top: 50%; }


.wb-node[data-shape="circle"] .wb-port[data-port="s"],
.wb-node[data-shape="ellipse"] .wb-port[data-port="s"] { left: 50%; top: 98.5%; }


.wb-node[data-shape="circle"] .wb-port[data-port="w"],
.wb-node[data-shape="ellipse"] .wb-port[data-port="w"] { left: 1.5%; top: 50%; }


.wb-node[data-shape="square"] .wb-port[data-port="n"] { left: 50%; top: 1.5%; }


.wb-node[data-shape="square"] .wb-port[data-port="e"] { left: 98.5%; top: 50%; }


.wb-node[data-shape="square"] .wb-port[data-port="s"] { left: 50%; top: 98.5%; }


.wb-node[data-shape="square"] .wb-port[data-port="w"] { left: 1.5%; top: 50%; }


.board-view.is-connect .wb-port,
.board-view.is-linking .wb-port {
    opacity: 1;
    pointer-events: auto;
}


.board-view.is-connect .wb-port {
    width: 10px;
    height: 10px;
}


.wb-port:hover,
.wb-port.is-from,
.wb-port.is-target {
    background: var(--accent);
    border-color: #155e75;
    opacity: 1;
    pointer-events: auto;
}


.board-view.is-linking,
.board-view.is-linking .wb-node { cursor: crosshair; }


.wb-link,
#boardLinkDraft {
    vector-effect: non-scaling-stroke;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: calc(1.7px / var(--wb-z, 1));
}


#boardLinkDraft {
    stroke: var(--accent);
    stroke-width: calc(1.35px / var(--wb-z, 1));
    stroke-dasharray: 4 5;
    stroke-linecap: round;
}


.wb-node.is-done .wb-face { border-color: #166534; background: #0a120e; }


.wb-node.is-done.is-geo .wb-face,
.wb-node.is-done.is-text .wb-face { background: transparent; border: 0; }


.wb-node.is-done.is-geo .wb-geo { fill: none; stroke: #86efac; }


.wb-node header {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tone, var(--accent));
    margin-bottom: 4px;
}


.wb-node:not(.is-image) img { width: 100%; height: 72px; object-fit: cover; border-radius: 6px; margin-bottom: 6px; display: block; }


.wb-node.is-image {
    container-type: size;
}


.wb-node.is-image .wb-face {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}


.wb-node.is-image.is-empty .wb-geo {
    stroke: #3f3f46;
}


.wb-node.is-image.is-empty .wb-geo .wb-shape {
    fill: rgba(250, 250, 250, 0.08);
    stroke-dasharray: 2.4 6;
}


.wb-node.is-image .wb-copy {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}


.wb-node.is-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 0;
    border-radius: 6px;
    pointer-events: none;
}


.wb-image-slot {
    width: 100%;
    height: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 6cqh, 18px);
    padding: clamp(10px, 8cqmin, 28px);
    box-sizing: border-box;
    pointer-events: auto;
    font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
}


.wb-image-slot button,
.wb-image-slot input {
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    height: auto;
    border: 1px solid var(--line);
    border-radius: clamp(8px, 4cqmin, 18px);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: clamp(13px, 8cqh, 28px);
}


.wb-image-slot input { padding: 0 clamp(12px, 4cqw, 28px); }


.wb-image-slot button {
    cursor: pointer;
    color: var(--muted);
}


.wb-image-slot button:hover {
    color: var(--text);
    background: rgba(250, 250, 250, 0.04);
}


.wb-done {
    appearance: none;
    margin-top: 8px;
    height: 24px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #0c0c0e;
    color: var(--muted);
    font-size: 11px;
    cursor: pointer;
}


.wb-node.is-done .wb-done { color: #86efac; border-color: #166534; }


#boardLinks {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}


#boardLinks .wb-link-hit {
    fill: none;
    stroke: rgba(250, 250, 250, 0.01);
    stroke-width: calc(16px / var(--wb-z, 1));
    pointer-events: stroke;
    cursor: pointer;
}


#boardLinks .wb-link {
    fill: none;
    pointer-events: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: calc(var(--wb-link-sw, 1.7) * 1px / var(--wb-z, 1));
}


#boardLinks .wb-link.is-on {
    filter: brightness(1.12);
}


.wb-link-ui {
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
}


.wb-link-knob {
    position: absolute;
    width: 10px;
    height: 10px;
    margin: 0;
    padding: 0;
    border: 1px solid #09090b;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: auto;
    cursor: grab;
    transform: translate(-50%, -50%) scale(calc(1 / var(--wb-z, 1)));
}


.wb-link-knob:hover { background: #fafafa; }


.board-props.is-link .board-prop-shape { display: none; }


.board-props.is-link [data-board-layer] { display: none; }


.board-props.is-stroke .board-prop-shape { display: none; }


#boardLinks #boardLinkDraft {
    fill: none;
    stroke: var(--accent);
    stroke-width: calc(1.35px / var(--wb-z, 1));
    stroke-dasharray: 4 5;
    stroke-linecap: round;
}



.board-playbook {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(9, 9, 11, 0.92);
}


.board-playbook select {
    appearance: none;
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: #141416;
    color: var(--text);
    font: inherit;
    font-size: 12px;
}



.board-add-menu {
    position: absolute;
    z-index: 8;
    width: 240px;
    max-height: min(72vh, 520px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(18, 18, 20, 0.98);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}


.board-add-menu[hidden] { display: none !important; }


.board-add-menu b {
    display: block;
    padding: 8px 10px 4px;
    color: var(--faint);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.board-add-menu button {
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border: 0;
    background: transparent;
    color: var(--text);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}


.board-add-menu .board-mi {
    width: 16px;
    height: 16px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.board-add-menu .board-mi text {
    fill: currentColor;
    stroke: none;
    font-family: "Times New Roman", Times, serif;
    font-weight: 700;
}


.board-add-menu button > span { min-width: 0; }


.board-add-menu button:hover { background: #27272a; }


.board-add-menu button kbd,
.board-add-menu .board-kbd {
    margin-left: auto;
    color: var(--faint);
    font-size: 11px;
    font-family: inherit;
}


.board-add-menu hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 4px 6px;
}


.board-add-menu button.danger { color: #fda4af; }


.board-add-grid { display: block; }

@media (max-width: 820px) {

        .board-bar {
            top: 8px;
            left: 6px;
            right: 6px;
            gap: 6px;
        }

        .page-whiteboard .work-top { display: none; }

        .board-toolbar { top: 8px; }

        .board-props { top: 58px; left: 8px; width: min(176px, calc(100% - 16px)); }
}

@media (max-width: 900px) {

        .board-bar { align-items: flex-start; }
}


html.reduce-motion .board-shift { transform: none !important; }

@media (prefers-reduced-motion: reduce) {

        .page-switch-thumb,
        .board-tool-thumb { transition: none; }
}
