/* Boards provides a focused, semantic DOM canvas without taking over the shared shell. */
.boards-content,
.boards-content * {
    box-sizing: border-box;
}

.boards-content .pc-action {
    min-height: 44px;
}

.board-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.boards-library-page {
    min-height: calc(100dvh - 78px);
}

.boards-library {
    display: grid;
    padding-bottom: 82px;
    gap: 26px;
}

.boards-library-header {
    display: block;
    min-height: 98px;
}

.boards-library-header > div:first-child {
    min-width: 0;
}

.boards-library-header .eyebrow,
.board-editor-heading .eyebrow,
.board-panel-header .eyebrow,
.board-dialog-header .eyebrow {
    margin: 0 0 5px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .11em;
    line-height: 1.2;
    text-transform: uppercase;
}

.boards-library-header h1,
.board-editor-heading h1,
.board-panel-header h2,
.board-dialog-header h2 {
    margin: 0;
    color: var(--ink);
    line-height: 1.08;
}

.boards-library-header h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.boards-library-header p:last-child {
    max-width: 670px;
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.boards-empty {
    min-height: 390px;
    padding: 36px;
}

.boards-empty h2,
.boards-empty p {
    margin: 0;
}

.boards-empty p {
    max-width: 440px;
    color: var(--muted);
    line-height: 1.55;
}

.boards-empty svg {
    width: 28px;
    height: 28px;
}

.boards-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 16px;
}

.boards-library-filter-empty {
    min-height: 120px;
    margin: 0;
    padding: 28px;
    place-items: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.boards-library-filter-empty:not([hidden]) {
    display: grid;
}

.boards-bottom-actionbar {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(28px, calc(env(safe-area-inset-bottom) + 14px));
    left: max(14px, env(safe-area-inset-left));
    z-index: 50;
    display: flex;
    width: min(720px, calc(100% - 28px));
    margin: 0 auto;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, bottom .18s ease;
}

.boards-bottom-actionbar > * {
    pointer-events: auto;
}

.board-library-search-field {
    display: flex;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    flex: 1;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    box-shadow: 0 18px 60px rgba(20, 23, 35, .22);
    backdrop-filter: blur(18px);
}

.board-library-search-field > svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    color: var(--muted);
}

.board-library-search-field input {
    width: 100%;
    min-width: 0;
    color: var(--ink);
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 16px;
}

.board-library-search-field input::-webkit-search-cancel-button {
    appearance: none;
    -webkit-appearance: none;
}

.board-library-search-clear {
    display: inline-grid;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--muted);
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ink) 8%, transparent);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: scale(.88);
    transition: color .16s ease, background .16s ease, opacity .16s ease, transform .16s ease;
    -webkit-tap-highlight-color: transparent;
}

.board-library-search-field.has-search-value .board-library-search-clear {
    opacity: .82;
    pointer-events: auto;
    transform: none;
}

.board-library-search-clear span {
    display: block;
    margin-top: -1px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.board-library-search-clear:hover,
.board-library-search-clear:focus-visible {
    color: var(--ink);
    outline: 0;
    background: color-mix(in srgb, var(--ink) 13%, transparent);
    opacity: 1;
}

.board-bottom-create {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    flex: 0 0 auto;
    justify-content: center;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(101, 119, 255, .32);
}

.board-bottom-create svg {
    width: 24px;
    height: 24px;
}

@media (min-width: 761px) {
    .boards-bottom-actionbar {
        right: auto;
        left: calc(244px + ((100% - 244px) / 2));
        width: min(720px, calc(100% - 312px));
        transform: translateX(-50%);
    }
}

.board-library-card {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 250px;
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.board-library-card:hover,
.board-library-card:focus-within {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
    box-shadow: 0 18px 42px color-mix(in srgb, var(--ink) 10%, transparent);
    transform: translateY(-2px);
}

.board-library-card:has(.board-library-card-menu[open]) {
    z-index: 20;
}

.board-library-card-face {
    min-height: 248px;
}

.board-library-card-main {
    display: grid;
    min-height: 248px;
    padding: 8px 8px 14px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(64px, auto);
    align-content: start;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.board-library-card-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
    border-radius: 15px;
    background:
        linear-gradient(90deg, transparent 47%, color-mix(in srgb, var(--accent) 15%, transparent) 48% 52%, transparent 53%),
        linear-gradient(transparent 47%, color-mix(in srgb, var(--accent) 15%, transparent) 48% 52%, transparent 53%),
        color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.board-library-card-icon svg {
    width: 22px;
    height: 22px;
}

.board-library-card-preview {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 13px;
}

.board-library-card-preview > svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.board-library-card-preview > img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.board-library-card-copy {
    display: grid;
    min-width: 0;
    padding-right: 52px;
    gap: 7px;
}

.board-library-card-copy strong {
    overflow: hidden;
    font-size: 15px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-library-card-copy small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.board-library-card-info {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-library-card-meta {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.board-library-card-meta small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-library-shared-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 5px;
    color: var(--accent);
    font-size: 10px;
    font-style: normal;
    font-weight: 850;
    letter-spacing: .03em;
    line-height: 1;
    text-transform: uppercase;
}

.board-library-shared-badge svg {
    width: 13px;
    height: 13px;
}

.board-library-card-menu {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 4;
}

.board-library-card-menu > summary {
    list-style: none;
}

.board-library-card-menu > summary::-webkit-details-marker {
    display: none;
}

.board-library-card-menu-trigger {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--ink) 9%, transparent);
}

.board-library-card-menu-trigger svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.4;
}

.board-library-card-menu-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    display: grid;
    width: 158px;
    padding: 6px;
    gap: 3px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 98%, transparent);
    box-shadow: 0 18px 42px rgba(5, 8, 20, .28);
}

.board-library-card-menu-item {
    display: flex;
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    border: 0;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.board-library-card-menu-item svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.board-library-card-menu-item:hover,
.board-library-card-menu-item:focus-visible {
    outline: 0;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.board-library-card-menu-item.danger {
    color: #df4b6a;
}

.board-library-card-menu-item.danger:hover,
.board-library-card-menu-item.danger:focus-visible {
    color: #fff;
    background: #c83252;
}

body:has(.boards-editor-page) {
    overflow: hidden;
}

body:has(.boards-editor-page) .main-content {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

body:has(.boards-editor-page) .boards-content {
    width: 100%;
    max-width: none;
    height: calc(100dvh - 78px);
    min-height: 520px;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.board-editor {
    display: grid;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    background: var(--canvas);
}

body .board-editor-topbar {
    z-index: 55;
    justify-content: flex-start;
    padding-right: 188px;
}

.board-editor-heading,
.board-editor-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.board-editor-topbar .board-editor-heading {
    flex: 1 1 auto;
    overflow: hidden;
}

.board-editor-topbar .board-editor-actions {
    margin-left: auto;
    flex: 0 0 auto;
}

.board-editor-title-copy {
    min-width: 0;
}

.board-editor-title {
    position: absolute;
    left: 50%;
    display: flex;
    max-width: min(32vw, 260px);
    align-items: center;
    transform: translateX(-50%);
}

.board-editor-title-copy {
    max-width: 100%;
    text-align: center;
}

.board-editor-heading h1 {
    max-width: 100%;
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-title-edit-button {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    color: var(--muted);
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

.board-title-edit-button:hover,
.board-title-edit-button:focus-visible {
    color: var(--accent);
    outline: 0;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.board-title-edit-button svg {
    width: 15px;
    height: 15px;
}

.board-key-glyph {
    display: inline-grid;
    min-width: 27px;
    height: 19px;
    padding: 0 4px;
    place-items: center;
    color: currentColor;
    border: 1.5px solid currentColor;
    border-radius: 5px;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: .02em;
    line-height: 1;
    text-transform: lowercase;
}

.board-readonly-chip {
    min-height: 34px;
}

.board-save-state {
    display: inline-flex;
    min-height: 36px;
    padding: 0 10px;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.board-save-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2ca977;
    box-shadow: 0 0 0 4px color-mix(in srgb, #2ca977 12%, transparent);
}

.board-save-state.is-saving .board-save-dot {
    background: #d79a2b;
    box-shadow: 0 0 0 4px color-mix(in srgb, #d79a2b 13%, transparent);
    animation: board-save-pulse 1s ease-in-out infinite;
}

.board-save-state.is-live .board-save-dot {
    background: #2ca977;
    box-shadow: 0 0 0 4px color-mix(in srgb, #2ca977 12%, transparent);
}

.board-save-state.is-error {
    color: #b53450;
}

.board-save-state.is-error .board-save-dot {
    background: #be3853;
    box-shadow: 0 0 0 4px color-mix(in srgb, #be3853 12%, transparent);
}

.board-save-state button {
    min-width: 44px;
    min-height: 44px;
    padding: 4px 7px;
    color: inherit;
    border: 0;
    border-radius: 7px;
    background: color-mix(in srgb, currentColor 9%, transparent);
    font: inherit;
    cursor: pointer;
}

@keyframes board-save-pulse {
    50% { opacity: .45; }
}

.board-canvas-shell {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    isolation: isolate;
    background: color-mix(in srgb, var(--canvas) 94%, var(--surface));
}

.board-viewport {
    position: absolute;
    z-index: 1;
    inset: 0;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    color: var(--ink);
    outline: 0;
    cursor: default;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    overscroll-behavior: contain;
}

.board-viewport.is-panning,
.board-viewport.is-space-pan {
    cursor: grabbing;
}

.board-viewport.is-pan-tool:not(.is-panning) {
    cursor: grab;
}

.board-viewport.is-arrow-tool {
    cursor: crosshair;
}

.board-viewport.is-link-tool {
    cursor: alias;
}

.board-viewport.is-text-tool {
    cursor: text;
}

.board-grid {
    --board-grid-dot-color: color-mix(in srgb, var(--muted) 28%, transparent);
    position: absolute;
    z-index: 0;
    inset: 0;
    opacity: .78;
    background-image:
        radial-gradient(
            circle at var(--board-grid-dot-center, center),
            var(--board-grid-dot-color) var(--board-grid-dot-radius, 1.15px),
            transparent var(--board-grid-dot-fade, 1.25px)
        );
    background-position: 0 0;
    background-size: 24px 24px;
    pointer-events: none;
}

.board-grid[data-board-snap="true"] {
    --board-grid-dot-color: color-mix(in srgb, var(--accent) 58%, transparent);
    opacity: .95;
}

.board-text-composer {
    position: absolute;
    z-index: 95;
    width: min(320px, calc(100% - 24px));
    margin: 0;
    padding: 8px;
    border-radius: 13px;
    box-shadow: 0 14px 38px color-mix(in srgb, var(--ink) 18%, transparent);
    user-select: text;
    -webkit-user-select: text;
}

.board-text-composer[hidden] {
    display: none;
}

.board-text-composer .pc-field {
    display: flex;
    min-height: 42px;
    padding-inline: 12px;
}

.board-text-composer input {
    width: 100%;
    min-width: 0;
}

.board-context-menu {
    position: fixed;
    z-index: 100;
    display: grid;
    width: min(336px, calc(100vw - 16px));
    padding: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 97%, var(--canvas));
    box-shadow: 0 18px 55px color-mix(in srgb, #080a12 34%, transparent);
    backdrop-filter: blur(18px);
    touch-action: manipulation;
    animation: board-context-menu-in .14s ease-out;
}

.board-context-menu button {
    display: inline-flex;
    min-width: 0;
    min-height: 48px;
    padding: 7px 6px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--ink);
    border: 0;
    border-radius: 11px;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.board-context-menu button[hidden] {
    display: none;
}

.board-context-menu button svg {
    width: 16px;
    height: 16px;
}

.board-context-menu.is-board-lock-menu {
    width: min(232px, calc(100vw - 16px));
    grid-template-columns: minmax(0, 1fr);
}

.board-context-menu button:hover,
.board-context-menu button:focus-visible {
    outline: 0;
    background: color-mix(in srgb, var(--accent) 11%, var(--surface));
}

.board-context-menu button.is-danger {
    color: var(--danger);
}

.board-context-menu button:disabled {
    opacity: .38;
    cursor: default;
}

@keyframes board-context-menu-in {
    from {
        opacity: 0;
        transform: translateY(4px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.board-world {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: visible;
    transform: translate3d(0, 0, 0) scale(1);
    transform-origin: 0 0;
    will-change: transform;
}

.board-link-visual-layer,
.board-region-layer,
.board-item-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: visible;
}

.board-link-visual-layer {
    z-index: 30;
    pointer-events: none;
}

.board-region-layer {
    z-index: 10;
}

.board-region-layer,
.board-item-layer {
    pointer-events: none;
}

.board-item-layer {
    z-index: 20;
}

.board-link-visual-line {
    fill: none;
    stroke-width: 1.5;
    stroke-dasharray: 7 7;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    opacity: .82;
}

.board-arrow-object {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: visible;
    pointer-events: none;
}

.board-element {
    position: absolute;
    min-width: 0;
    min-height: 0;
    pointer-events: auto;
    color: var(--ink);
    outline: none;
    transform: rotate(var(--board-rotation, 0deg));
    transform-origin: center;
    touch-action: none;
}

figure.board-element {
    margin: 0;
}

.board-element[data-board-element-type="note"],
.board-element[data-board-element-type="image"] {
    border: max(1px, var(--board-object-hairline, 1px)) solid color-mix(in srgb, var(--ink) 12%, var(--line));
    border-radius: 12px;
}

.board-element[data-board-element-type="note"] {
    box-shadow: 0 11px 28px color-mix(in srgb, var(--ink) 14%, transparent);
}

.board-element[data-board-element-type="note"] {
    display: grid;
    min-width: 40px;
    min-height: 40px;
    padding: 17px 18px;
    align-content: start;
    color: var(--board-note-text, #273044);
    background: var(--board-note-color, #fff3a8);
    cursor: default;
}

.board-note-text {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-size: clamp(12px, 14px, 18px);
    font-weight: 650;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.board-local-note-title {
    margin-bottom: 8px;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-element.is-linked-note {
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 10px;
}

.board-linked-note-title {
    overflow: hidden;
    font-size: 16px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-linked-note-copy {
    font-size: 13px;
    font-weight: 600;
    white-space: normal;
}

.board-linked-note-copy :is(p, h1, h2, ul, ol) {
    margin: 0 0 .55em;
}

.board-linked-note-copy :is(ul, ol) {
    padding-left: 1.4em;
}

.board-linked-note-copy :is(h1, .note-inline-heading-1) {
    font-size: 1.4em;
    line-height: 1.15;
}

.board-linked-note-copy :is(h2, .note-inline-heading-2) {
    font-size: 1.18em;
    line-height: 1.2;
}

.board-linked-note-copy .note-checklist-item {
    position: relative;
    display: block;
    min-height: 18px;
    margin: 5px 0;
    padding-left: 25px;
}

.board-linked-note-copy .note-checklist-item::before {
    position: absolute;
    top: 1px;
    left: 0;
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 50%;
    content: "";
}

.board-linked-note-copy .note-checklist-done {
    text-decoration: line-through;
    opacity: .55;
}

.board-linked-note-copy .note-checklist-done::before {
    background: currentColor;
    box-shadow: inset 0 0 0 3px var(--board-note-color, #fff3a8);
}

.board-linked-note-copy .note-text-color-purple { color: #8b6cff; }
.board-linked-note-copy .note-text-color-pink { color: #e45f9c; }
.board-linked-note-copy .note-text-color-orange { color: #d87828; }
.board-linked-note-copy .note-text-color-mint { color: #279c7b; }
.board-linked-note-copy .note-text-color-blue { color: #397ed4; }
.board-linked-note-copy .note-text-color-white { color: #fff; }

}

.board-linked-note-badge {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .04em;
    opacity: .72;
    text-transform: uppercase;
}

.board-linked-note-badge svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.board-element.is-linked-note-unavailable {
    background-image: repeating-linear-gradient(
        -45deg,
        transparent 0 12px,
        color-mix(in srgb, var(--ink) 4%, transparent) 12px 24px
    );
}

.board-element.is-inline-editing {
    z-index: 1000001 !important;
    padding: 8px;
}

.board-element[data-board-element-type="note"].is-inline-editing {
    grid-template-rows: minmax(0, 1fr);
    align-content: stretch;
}

.board-inline-editor {
    display: grid;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    gap: 7px;
}

.board-element[data-board-element-type="note"] .board-inline-editor {
    grid-template-rows: auto minmax(0, 1fr);
}

.board-inline-editor input,
.board-inline-editor textarea {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 7px 8px;
    color: inherit;
    border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
    border-radius: 8px;
    outline: 0;
    background: color-mix(in srgb, var(--surface) 25%, transparent);
    font: inherit;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.board-inline-editor textarea {
    min-height: 0;
    resize: none;
    line-height: 1.4;
}

.board-inline-editor input:focus,
.board-inline-editor textarea:focus {
    border-color: color-mix(in srgb, var(--accent) 72%, currentColor);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.board-inline-note-title {
    font-size: 16px !important;
    font-weight: 800 !important;
}

.board-element[data-board-element-type="text"].is-inline-editing {
    overflow: visible;
    padding: 0;
}

.boards-content.boards-editor-page .board-element[data-board-element-type="text"] .board-inline-editor input {
    height: 100%;
    min-height: 100%;
    color: var(--board-text-color, #6577ff);
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    font-size: var(--board-text-font-size, 24px) !important;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: inherit;
}

.board-element[data-board-element-type="text"] {
    display: flex;
    min-width: 40px;
    min-height: 40px;
    padding: 4px 6px;
    align-items: center;
    overflow: hidden;
    color: var(--board-text-color, #6577ff);
    border: 0;
    background: transparent;
    box-shadow: none;
    cursor: default;
}

.board-viewport.is-board-locked,
.board-viewport.is-board-locked .board-element {
    cursor: grab;
}

.board-viewport.is-board-locked.is-panning,
.board-viewport.is-board-locked.is-panning .board-element {
    cursor: grabbing;
}

.board-element[data-board-element-type="text"].is-screen-space {
    --board-selection-line: 2px;
    --board-focus-line: 6px;
    transform: scale(var(--board-inverse-zoom, 1)) rotate(var(--board-rotation, 0deg));
    transform-origin: var(--board-text-origin-x, 0%) var(--board-text-origin-y, 100%);
}

.board-text-content {
    display: block;
    width: 100%;
    overflow: hidden;
    font-size: var(--board-text-font-size, 24px);
    font-weight: 750;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.board-element[data-board-element-type="shape"] {
    min-width: 40px;
    min-height: 40px;
    border: 0;
    background: transparent;
    box-shadow: none;
    cursor: default;
}

.board-element[data-board-element-type="shape"].is-screen-space {
    --board-selection-line: 2px;
    --board-focus-line: 6px;
    transform: scale(var(--board-inverse-zoom, 1)) rotate(var(--board-rotation, 0deg));
    transform-origin: center;
}

.board-shape-visual {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.board-element[data-board-element-type="image"] {
    /* Clip only the media so corner handles can extend beyond the rounded card. */
    overflow: visible;
    background: color-mix(in srgb, var(--surface) 88%, var(--canvas));
    box-shadow: none;
    cursor: default;
}

.board-element[data-board-element-type="image"] img {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-drag: none;
}

.board-image-fallback {
    display: grid;
    width: 100%;
    height: 100%;
    padding: 12px;
    overflow: hidden;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: var(--muted);
    border-radius: inherit;
    text-align: center;
    font-size: 12px;
    line-height: 1.35;
}

.board-image-fallback svg {
    width: 25px;
    height: 25px;
}

.board-element[data-board-element-type="region"] {
    min-width: 40px;
    min-height: 40px;
    border: max(2px, var(--board-object-hairline, 1px)) var(--board-region-border-style, dashed) var(--board-region-border, #6577ff);
    border-radius: 17px;
    background: var(--board-region-background, #edf0ff);
    cursor: default;
}

.board-region-label {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    max-width: calc(100% - 30px);
    padding: 6px 10px;
    overflow: hidden;
    color: var(--board-region-border, var(--accent));
    border: 1px solid color-mix(in srgb, var(--board-region-border, var(--accent)) 32%, var(--line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 91%, transparent);
    box-shadow: 0 5px 14px color-mix(in srgb, var(--ink) 7%, transparent);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    transform: scale(var(--board-inverse-zoom, 1)) translate(15px, -16px);
    transform-origin: top left;
}

.board-element.is-selected {
    box-shadow:
        0 0 0 var(--board-selection-line, 2px) var(--accent),
        0 14px 34px color-mix(in srgb, var(--ink) 16%, transparent);
}

.board-element.is-link-preview,
.board-element.is-link-source {
    outline: max(1px, var(--board-selection-line, 2px)) dotted color-mix(in srgb, var(--accent) 72%, transparent);
    outline-offset: calc(4px * var(--board-inverse-zoom, 1));
}

.board-element.is-link-source {
    outline-color: #e8872d;
}

.board-element.is-link-visual {
    outline: max(1px, var(--board-selection-line, 2px)) dotted var(--board-link-color);
    outline-offset: calc(4px * var(--board-inverse-zoom, 1));
}

.board-element[data-board-element-type="region"].is-selected {
    box-shadow: 0 0 0 var(--board-selection-line, 2px) color-mix(in srgb, var(--accent) 82%, transparent);
}

.board-element:focus-visible {
    box-shadow:
        0 0 0 var(--board-selection-line, 2px) var(--accent),
        0 0 0 var(--board-focus-line, 6px) color-mix(in srgb, var(--accent) 18%, transparent),
        0 14px 34px color-mix(in srgb, var(--ink) 16%, transparent);
}

.board-element[data-board-element-type="image"].is-selected,
.board-element[data-board-element-type="image"]:focus-visible {
    box-shadow: 0 0 0 var(--board-selection-line, 2px) var(--accent);
}

.board-resize-handle {
    position: absolute;
    z-index: 4;
    width: var(--board-handle-hit, 44px);
    height: var(--board-handle-hit, 44px);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: nwse-resize;
    transform: translate(50%, 50%);
    touch-action: none;
}

.board-resize-handle::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--board-handle-dot, 12px);
    height: var(--board-handle-dot, 12px);
    border: var(--board-handle-border, 2px) solid var(--surface);
    border-radius: 4px;
    background: var(--accent);
    box-shadow: 0 2px 7px color-mix(in srgb, var(--ink) 20%, transparent);
    content: "";
    transform: translate(-50%, -50%);
}

.board-resize-handle[data-board-resize="se"] {
    right: 0;
    bottom: 0;
}

.board-resize-handle[data-board-resize="nw"] {
    top: 0;
    left: 0;
    cursor: nwse-resize;
    transform: translate(-50%, -50%);
}

.board-resize-handle[data-board-resize="ne"] {
    top: 0;
    right: 0;
    cursor: nesw-resize;
    transform: translate(50%, -50%);
}

.board-resize-handle[data-board-resize="sw"] {
    bottom: 0;
    left: 0;
    cursor: nesw-resize;
    transform: translate(-50%, 50%);
}

.board-arrow-artwork,
.board-arrow-markers {
    pointer-events: none;
}

.board-arrow-markers {
    fill: none;
    stroke: none;
}

.board-arrow-visible {
    fill: none;
    /* Geometry ends at each arrowhead base; the butt cap keeps that join exact. */
    stroke-linecap: butt;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.board-arrow-object marker path {
    fill: context-stroke;
}

.board-arrow-hit {
    fill: none;
    stroke: transparent;
    stroke-width: 22;
    stroke-linecap: round;
    pointer-events: stroke;
    vector-effect: non-scaling-stroke;
    cursor: default;
}

.board-arrow-group.is-link-visual .board-arrow-hit {
    stroke: var(--board-link-color);
    stroke-width: 7;
    stroke-dasharray: 2 7;
    opacity: .78;
}

.board-arrow-group.is-link-preview .board-arrow-artwork {
    filter: drop-shadow(0 0 3px color-mix(in srgb, var(--accent) 72%, transparent));
}

.board-arrow-group.is-link-source .board-arrow-artwork {
    filter: drop-shadow(0 0 4px color-mix(in srgb, #e8872d 82%, transparent));
}

.board-arrow-group.is-selected .board-arrow-artwork,
.board-arrow-group:focus-visible .board-arrow-artwork {
    /* SVG filters can expose their rectangular region while mobile pans. */
    filter: none;
}

.board-arrow-group:focus {
    outline: none;
}

.board-arrow-handle {
    position: absolute;
    z-index: 8;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: default;
    touch-action: none;
    transform: translate(-50%, -50%);
}

.board-arrow-handle::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--ink) 24%, transparent);
    content: "";
    transform: translate(-50%, -50%);
}

.board-arrow-handle.is-link-source::after {
    background: #e8872d;
}

.board-marquee {
    position: absolute;
    z-index: 7;
    border: 1px solid color-mix(in srgb, var(--accent) 75%, transparent);
    border-radius: 5px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    pointer-events: none;
}

.board-arrow-draft {
    position: absolute;
    z-index: 6;
    inset: 0;
    pointer-events: none;
}

.board-arrow-draft svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.board-arrow-draft line {
    stroke: var(--accent);
    stroke-width: 2;
    stroke-dasharray: 7 6;
    stroke-linecap: round;
}

.board-tool-palette,
.board-shape-picker,
.board-zoom-controls,
.board-library-drawer,
.board-outline-panel,
.board-upload-state {
    position: absolute;
    z-index: 30;
}

.board-tool-palette {
    top: 50%;
    left: 14px;
    display: flex;
    width: 76px;
    padding: 7px;
    align-items: stretch;
    flex-direction: column;
    gap: 3px;
    border-radius: 18px;
    transform: translateY(-50%);
}

.board-shape-picker {
    z-index: 31;
    top: 50%;
    left: 98px;
    display: grid;
    padding: 6px;
    grid-template-columns: repeat(5, 44px);
    gap: 4px;
    border-radius: 16px;
    transform: translateY(-50%);
}

.board-shape-picker button {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    color: var(--ink);
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    cursor: pointer;
}

.board-shape-picker button:hover,
.board-shape-picker button:focus-visible {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
    outline: 0;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.board-shape-picker svg {
    width: 24px;
    height: 24px;
    overflow: visible;
    fill: color-mix(in srgb, currentColor 18%, transparent);
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linejoin: round;
}

.board-tool-button {
    display: grid;
    min-width: 0;
    min-height: 52px;
    padding: 6px 4px;
    place-items: center;
    align-content: center;
    gap: 4px;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    font: inherit;
    font-size: 9px;
    font-weight: 850;
    line-height: 1.1;
    cursor: pointer;
}

.board-tool-button svg {
    width: 18px;
    height: 18px;
}

.board-text-glyph {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    color: currentColor;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.board-tool-button:hover,
.board-tool-button:focus-visible,
.board-tool-button.is-active {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
    outline: 0;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.board-tool-button:disabled {
    opacity: .38;
    cursor: not-allowed;
}

.board-tool-icon-only {
    min-height: 44px;
}

.board-tool-divider {
    height: 1px;
    margin: 3px 7px;
    background: var(--line);
}

.board-zoom-controls {
    right: 14px;
    bottom: 14px;
    display: flex;
    height: 52px;
    padding: 3px;
    align-items: center;
    gap: 1px;
    border-radius: 15px;
}

.board-zoom-controls button {
    position: relative;
    display: grid;
    min-width: 44px;
    height: 44px;
    padding: 0 8px;
    place-items: center;
    color: var(--ink);
    border: 0;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    font-size: 18px;
    font-weight: 850;
    cursor: pointer;
}

.board-zoom-controls button:hover,
.board-zoom-controls button:focus-visible,
.board-zoom-controls button.is-active {
    color: var(--accent);
    outline: 0;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.board-zoom-controls [data-board-lock-toggle].is-active {
    color: var(--warning, #a15c00);
    background: color-mix(in srgb, var(--warning, #a15c00) 12%, transparent);
}

.board-zoom-controls button:disabled {
    opacity: .34;
    cursor: not-allowed;
}

.board-zoom-controls [data-board-snap-toggle]::after {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 5px;
    height: 5px;
    border: 1px solid currentColor;
    border-radius: 50%;
    content: "";
}

.board-zoom-controls [data-board-snap-toggle].is-active::after {
    background: currentColor;
}

.board-zoom-controls .board-zoom-value {
    min-width: 62px;
    font-size: 11px;
}

.board-zoom-controls svg {
    width: 17px;
    height: 17px;
}

.board-library-drawer,
.board-outline-panel {
    top: 10px;
    bottom: 10px;
    display: grid;
    width: min(360px, calc(100% - 20px));
    min-height: 0;
    padding: 13px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    border-radius: 19px;
    box-shadow: 0 24px 64px color-mix(in srgb, var(--ink) 18%, transparent);
}

.board-library-drawer {
    z-index: 52;
    left: 10px;
}

.board-outline-panel {
    z-index: 52;
    right: 10px;
    grid-template-rows: auto auto minmax(0, 1fr);
}

.board-panel-header,
.board-dialog-header {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.board-panel-header h2,
.board-dialog-header h2 {
    font-size: 18px;
}

.board-drawer-list,
.board-outline-list {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.board-drawer-list {
    display: grid;
    align-content: start;
    gap: 4px;
}

.board-drawer-row {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 3px;
    border-radius: 13px;
}

.board-drawer-row > a {
    display: grid;
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
    grid-template-columns: 18px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.board-drawer-row > a > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-drawer-row svg {
    width: 17px;
    height: 17px;
}

.board-drawer-row > button {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    color: var(--muted);
    border: 0;
    border-radius: 11px;
    background: transparent;
    cursor: pointer;
}

.board-drawer-row:hover,
.board-drawer-row:focus-within,
.board-drawer-row.is-current {
    background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.board-drawer-row.is-current > a,
.board-drawer-row > a:hover,
.board-drawer-row > a:focus-visible,
.board-drawer-row > button:hover,
.board-drawer-row > button:focus-visible {
    color: var(--accent);
    outline: 0;
}

.board-drawer-check {
    color: var(--accent);
}

.board-drawer-shared {
    color: var(--muted);
}

.board-drawer-create,
.board-drawer-delete {
    width: 100%;
}

.board-drawer-delete {
    grid-row: 4;
}

.board-panel-scrim {
    position: absolute;
    z-index: 51;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: default;
    backdrop-filter: blur(5px);
}

.board-outline-search {
    min-height: 44px;
    padding: 0 12px;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
}

.board-outline-search svg {
    width: 17px;
    height: 17px;
    color: var(--muted);
}

.board-outline-list {
    display: grid;
    align-content: start;
    gap: 4px;
}

.board-outline-entry {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 3px;
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: center;
    gap: 2px;
    color: var(--ink);
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
}

.board-outline-entry:hover,
.board-outline-entry.is-selected {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
    background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.board-outline-entry-main {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 3px 6px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    color: inherit;
    border: 0;
    border-radius: 9px;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.board-outline-entry-main:focus-visible,
.board-outline-entry-settings:hover,
.board-outline-entry-settings:focus-visible {
    color: var(--accent);
    outline: 0;
    background: color-mix(in srgb, var(--accent) 11%, var(--surface));
}

.board-outline-entry-settings {
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    color: var(--muted);
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
}

.board-outline-entry-settings svg {
    width: 16px;
    height: 16px;
}

.board-outline-entry-settings:disabled {
    opacity: .32;
    cursor: default;
}

.board-outline-entry-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: inherit;
    border-radius: 10px;
    background: color-mix(in srgb, currentColor 8%, transparent);
}

.board-outline-entry-icon svg {
    width: 16px;
    height: 16px;
}

.board-outline-entry-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.board-outline-entry-copy strong,
.board-outline-entry-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-outline-entry-copy strong {
    font-size: 11px;
}

.board-outline-entry-copy small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    text-transform: uppercase;
}

.board-outline-entry-order {
    color: var(--muted);
    font-size: 9px;
    font-variant-numeric: tabular-nums;
}

.board-outline-empty {
    align-self: start;
    margin: 22px 10px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
}

.board-drop-indicator {
    position: absolute;
    z-index: 70;
    inset: 18px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: var(--accent);
    border: 2px dashed color-mix(in srgb, var(--accent) 65%, transparent);
    border-radius: 20px;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    font-size: 14px;
    font-weight: 900;
    pointer-events: none;
    backdrop-filter: blur(7px);
}

.board-drop-indicator svg {
    width: 34px;
    height: 34px;
}

.board-upload-state {
    z-index: 72;
    top: 14px;
    left: 50%;
    display: grid;
    min-width: min(320px, calc(100% - 28px));
    min-height: 55px;
    padding: 10px 13px;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 4px 9px;
    border-radius: 15px;
    transform: translateX(-50%);
}

.board-upload-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid color-mix(in srgb, var(--accent) 22%, var(--line));
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: board-spin .7s linear infinite;
}

.board-upload-state span:nth-child(2) {
    color: var(--ink);
    font-size: 11px;
    font-weight: 850;
}

.board-upload-state progress {
    width: 100%;
    height: 4px;
    grid-column: 2;
    accent-color: var(--accent);
}

@keyframes board-spin {
    to { transform: rotate(360deg); }
}

.board-dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    padding: 18px;
    border: 0;
    background: transparent;
}

.board-dialog[open] {
    display: grid;
    place-items: center;
}

.board-dialog::backdrop {
    background: transparent;
    backdrop-filter: blur(5px);
}

.board-properties-dialog.is-color-picking .board-dialog-panel {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.board-properties-dialog.is-native-color-picking .board-dialog-panel {
    opacity: 0;
}

.board-properties-dialog.is-color-picking::backdrop,
.board-properties-dialog.is-native-color-picking::backdrop {
    backdrop-filter: none;
}

.board-color-return {
    position: absolute;
    z-index: 3;
    top: max(12px, env(safe-area-inset-top));
    left: 50%;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: 0 12px 32px color-mix(in srgb, #080a12 24%, transparent);
    backdrop-filter: blur(16px);
    transform: translateX(-50%);
}

.board-color-return[hidden] {
    display: none;
}

.board-color-return svg {
    transform: rotate(180deg);
}

.board-dialog-panel {
    display: grid;
    gap: 17px;
    margin: auto;
}

.board-properties-dialog .board-dialog-panel {
    width: min(560px, 100%);
    max-height: min(760px, calc(100dvh - 36px));
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 14px;
    overflow: hidden;
}

.board-properties-dialog .board-dialog-panel:has(.board-select.is-open) {
    /* Property listboxes are viewport-positioned so long menus stay inside the
       screen; expose the active menu beyond the panel's normal scroll clip. */
    overflow: visible;
}

.board-properties-scroll {
    display: grid;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2px 3px 4px;
    gap: 13px;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.board-properties-group {
    display: grid;
    min-width: 0;
    gap: 12px;
}

.board-properties-group[hidden] {
    display: none;
}

.board-properties-section-label {
    display: flex;
    margin: 1px 0 -1px;
    align-items: center;
    gap: 9px;
    color: color-mix(in srgb, var(--accent) 80%, var(--ink));
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.board-properties-section-label::after {
    height: 1px;
    flex: 1;
    content: "";
    background: color-mix(in srgb, var(--accent) 16%, var(--line));
}

.board-properties-layer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 54px;
    padding: 4px 5px 4px 13px;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 94%, var(--canvas));
}

.board-properties-layer > label {
    color: var(--ink);
    font-size: 11px;
    font-weight: 850;
}

.board-layer-stepper {
    display: grid;
    min-width: 142px;
    grid-template-columns: 44px minmax(46px, 1fr) 44px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: color-mix(in srgb, var(--canvas) 58%, var(--surface));
}

.board-layer-stepper button,
.board-layer-stepper input {
    height: 44px;
    min-width: 0;
    padding: 0;
    color: var(--ink);
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 850;
    text-align: center;
}

.board-layer-stepper button {
    cursor: pointer;
}

.board-layer-stepper button:first-child {
    border-right: 1px solid var(--line);
}

.board-layer-stepper button:last-child {
    border-left: 1px solid var(--line);
}

.board-layer-stepper button:hover,
.board-layer-stepper button:focus-visible {
    color: var(--accent);
    outline: 0;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.board-layer-stepper button:disabled {
    opacity: .38;
    cursor: default;
}

.board-layer-stepper input {
    width: 100%;
    appearance: textfield;
    outline: 0;
}

.board-layer-stepper input::-webkit-inner-spin-button,
.board-layer-stepper input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}

.board-layer-stepper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 11%, transparent);
}

.pc-modal-panel.board-linked-note-dialog-panel {
    width: min(1180px, calc(100vw - 36px));
    max-width: none;
    height: min(900px, calc(100dvh - 36px));
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.board-linked-note-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--canvas);
}

.board-dialog-panel > p,
.board-form-help {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.board-share-dialog .board-dialog-panel {
    width: min(680px, calc(100vw - 36px));
    max-height: min(760px, calc(100dvh - 36px));
    overflow: auto;
}

.board-share-grant-form {
    margin: 0;
}

.board-share-list {
    max-height: 330px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.board-share-empty {
    padding: 16px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 92%, var(--canvas));
}

.board-form-field {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 11px;
    font-weight: 850;
}

.board-form-field .pc-field {
    min-height: 46px;
    padding: 0 13px;
}

.board-form-field .pc-field:has(textarea) {
    padding: 11px 13px;
}

.board-form-field .pc-field.board-select-field {
    position: relative;
    display: block;
    padding: 0;
}

.board-select-native {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    opacity: 0;
    pointer-events: none;
}

.board-select {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

.board-select-toggle {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--ink);
    border: 0;
    border-radius: 13px;
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.board-select-toggle:focus {
    outline: 0;
}

.board-select-toggle:disabled {
    cursor: default;
}

.board-select-value {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-select-preview {
    position: relative;
    display: inline-grid;
    width: 26px;
    height: 20px;
    flex: 0 0 26px;
    place-items: center;
    color: color-mix(in srgb, var(--accent) 68%, var(--ink));
}

.board-select-preview-svg {
    width: 26px;
    height: 20px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.board-select-glyph-muted {
    opacity: .38;
}

.board-select-glyph-fill {
    fill: currentColor;
    stroke: none;
}

.board-select-preview[data-board-select-name="arrow_head"][data-board-select-value="end"] .board-select-arrow-start,
.board-select-preview[data-board-select-name="arrow_head"][data-board-select-value="start"] .board-select-arrow-end,
.board-select-preview[data-board-select-name="arrow_head"][data-board-select-value="none"] .board-select-arrow-start,
.board-select-preview[data-board-select-name="arrow_head"][data-board-select-value="none"] .board-select-arrow-end,
.board-select-preview[data-board-select-name$="_scale_mode"][data-board-select-value="world"] .board-select-scale-screen,
.board-select-preview[data-board-select-name$="_scale_mode"][data-board-select-value="screen"] .board-select-scale-world {
    display: none;
}

.board-select-toggle svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    color: var(--muted);
    transition: transform .16s ease;
}

.board-select.is-open .board-select-toggle svg {
    transform: rotate(180deg);
}

.board-select-menu {
    position: fixed;
    z-index: 80;
    display: grid;
    overflow-y: auto;
    padding: 6px;
    gap: 3px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 97%, var(--canvas));
    box-shadow: 0 18px 55px color-mix(in srgb, #080a12 32%, transparent);
    backdrop-filter: blur(18px);
    overscroll-behavior: contain;
    animation: board-select-in .14s ease-out;
}

.board-select-option {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 44px;
    padding: 8px 34px 8px 11px;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    border: 0;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.board-select-option-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-select-preview[data-board-select-name$="_border_style"]::before,
.board-select-preview[data-board-select-name="arrow_line_style"]::before {
    width: 25px;
    content: "";
    border-top: 2px solid currentColor;
}

.board-select-preview[data-board-select-name$="_border_style"][data-board-select-value="dashed"]::before,
.board-select-preview[data-board-select-name="arrow_line_style"][data-board-select-value="dashed"]::before {
    border-top-style: dashed;
}

.board-select-preview[data-board-select-name$="_border_style"][data-board-select-value="none"]::before {
    opacity: .38;
    border-top-style: dotted;
}

.board-select-preview[data-board-select-name$="_fill_style"]::before {
    width: 20px;
    height: 14px;
    content: "";
    border: 1px solid currentColor;
    border-radius: 4px;
    background: color-mix(in srgb, currentColor 28%, transparent);
}

.board-select-preview[data-board-select-name$="_fill_style"][data-board-select-value="none"]::before {
    background: transparent;
}

.board-select-preview[data-board-select-name="shape_kind"]::before {
    font-size: 17px;
    line-height: 1;
}

.board-select-preview[data-board-select-name="shape_kind"][data-board-select-value="circle"]::before { content: "●"; }
.board-select-preview[data-board-select-name="shape_kind"][data-board-select-value="triangle"]::before { content: "▲"; }
.board-select-preview[data-board-select-name="shape_kind"][data-board-select-value="rectangle"]::before { content: "■"; }
.board-select-preview[data-board-select-name="shape_kind"][data-board-select-value="star"]::before { content: "★"; }
.board-select-preview[data-board-select-name="shape_kind"][data-board-select-value="hexagon"]::before { content: "⬢"; }

.board-select-preview[data-board-select-name="text_size"]::before {
    content: "Aa";
    font-size: 10px;
    font-weight: 900;
}

.board-select-preview[data-board-select-name="text_size"][data-board-select-value="medium"]::before { font-size: 12px; }
.board-select-preview[data-board-select-name="text_size"][data-board-select-value="large"]::before { font-size: 14px; }
.board-select-preview[data-board-select-name="text_size"][data-board-select-value="extra_large"]::before { font-size: 16px; }

.board-select-preview[data-board-select-name="image_fit_mode"]::before {
    width: 24px;
    height: 17px;
    content: "";
    border: 1px solid currentColor;
    border-radius: 3px;
    background:
        linear-gradient(135deg, transparent 43%, currentColor 44% 48%, transparent 49%),
        color-mix(in srgb, currentColor 8%, transparent);
}

.board-select-preview[data-board-select-name="image_fit_mode"][data-board-select-value="cover"]::before {
    background:
        linear-gradient(135deg, transparent 34%, currentColor 35% 45%, transparent 46%),
        color-mix(in srgb, currentColor 18%, transparent);
}

.board-select-preview[data-board-select-name="text_anchor"]::before {
    position: absolute;
    inset: 2px 5px;
    content: "";
    border: 1px solid color-mix(in srgb, currentColor 58%, transparent);
    border-radius: 3px;
}

.board-select-preview[data-board-select-name="text_anchor"]::after {
    position: absolute;
    top: var(--board-anchor-y, 50%);
    left: var(--board-anchor-x, 50%);
    width: 5px;
    height: 5px;
    content: "";
    border-radius: 50%;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.board-select-preview[data-board-select-name="text_anchor"][data-board-select-value^="top_"] { --board-anchor-y: 4px; }
.board-select-preview[data-board-select-name="text_anchor"][data-board-select-value^="middle_"],
.board-select-preview[data-board-select-name="text_anchor"][data-board-select-value="center"] { --board-anchor-y: 50%; }
.board-select-preview[data-board-select-name="text_anchor"][data-board-select-value^="bottom_"] { --board-anchor-y: calc(100% - 4px); }
.board-select-preview[data-board-select-name="text_anchor"][data-board-select-value$="_left"] { --board-anchor-x: 7px; }
.board-select-preview[data-board-select-name="text_anchor"][data-board-select-value$="_center"],
.board-select-preview[data-board-select-name="text_anchor"][data-board-select-value="center"] { --board-anchor-x: 50%; }
.board-select-preview[data-board-select-name="text_anchor"][data-board-select-value$="_right"] { --board-anchor-x: calc(100% - 7px); }

.board-select-option:hover,
.board-select-option:focus-visible {
    outline: 0;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.board-select-option[aria-selected="true"] {
    color: color-mix(in srgb, var(--accent) 82%, var(--ink));
    background: color-mix(in srgb, var(--accent) 16%, var(--surface));
}

.board-select-option[aria-selected="true"]::after {
    position: absolute;
    top: 50%;
    right: 13px;
    width: 8px;
    height: 4px;
    content: "";
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: translateY(-70%) rotate(-45deg);
}

@keyframes board-select-in {
    from {
        opacity: 0;
        transform: translateY(-3px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.board-form-field input,
.board-form-field textarea,
.board-form-field select {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.board-form-field textarea {
    resize: vertical;
}

.board-color-control {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    padding: 1px 2px;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 94%, var(--canvas));
}

.board-color-control > input[type="color"] {
    width: 44px;
    min-width: 0;
    height: 44px;
    padding: 4px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.board-color-control > input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.board-color-control > input[type="color"]::-webkit-color-swatch {
    border: 1px solid color-mix(in srgb, var(--ink) 13%, var(--line));
    border-radius: 9px;
}

.board-color-control:focus-within {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 11%, transparent);
}

.board-color-value {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-color-eyedropper {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: var(--muted);
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.board-color-eyedropper[hidden] {
    display: none;
}

.board-color-eyedropper:hover,
.board-color-eyedropper:focus-visible {
    color: var(--accent);
    outline: 0;
    border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
    background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.board-color-eyedropper svg {
    width: 19px;
    height: 19px;
}

.board-range-control {
    display: grid;
    min-height: 48px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 10px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 94%, var(--canvas));
}

.board-range-control > input[type="range"] {
    width: 100%;
    height: 44px;
    accent-color: var(--accent);
}

.board-range-control output {
    min-width: 30px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-align: right;
}

.board-properties-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.board-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.board-properties-dialog .board-dialog-actions {
    justify-content: flex-start;
    padding-top: 1px;
}

.board-notes-dialog .board-dialog-panel {
    width: min(680px, 100%);
    max-height: min(88dvh, 760px);
    overflow: hidden;
}

.board-notes-search {
    display: flex;
    min-height: 46px;
    padding: 0 13px;
    align-items: center;
    gap: 9px;
}

.board-notes-search > svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    color: var(--muted);
}

.board-notes-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 16px;
}

.board-notes-list {
    display: grid;
    min-height: 190px;
    max-height: min(48dvh, 420px);
    padding: 2px 4px 5px 2px;
    align-content: start;
    gap: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.board-notes-list[aria-busy="true"] {
    opacity: .55;
}

.board-notes-item {
    display: grid;
    width: 100%;
    min-height: 68px;
    padding: 10px 12px;
    grid-template-columns: 40px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 96%, var(--canvas));
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.board-notes-item:hover,
.board-notes-item:focus-visible {
    outline: 0;
    border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 12%, transparent);
    transform: translateY(-1px);
}

.board-notes-item:disabled {
    cursor: wait;
    opacity: .58;
}

.board-notes-item-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: color-mix(in srgb, var(--accent) 80%, var(--ink));
    border-radius: 12px;
    background: color-mix(in srgb, var(--accent) 10%, var(--canvas));
}

.board-notes-item-icon svg,
.board-notes-item-link svg {
    width: 19px;
    height: 19px;
}

.board-notes-item-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.board-notes-item-copy strong,
.board-notes-item-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-notes-item-copy strong {
    font-size: 13px;
}

.board-notes-item-copy span {
    color: var(--muted);
    font-size: 11px;
}

.board-notes-item-link {
    display: grid;
    place-items: center;
    color: var(--muted);
}

.board-notes-state {
    min-height: 42px;
    margin: 0;
    padding: 11px 13px;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 13px;
    background: color-mix(in srgb, var(--canvas) 70%, transparent);
    font-size: 12px;
    line-height: 1.5;
}

.board-notes-actions {
    flex-wrap: wrap;
}

.board-linked-note-fields {
    display: grid;
    gap: 13px;
}

.board-linked-note-edit {
    width: 100%;
}

.board-linked-note-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.board-linked-note-heading > span {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
    color: color-mix(in srgb, var(--accent) 76%, var(--ink));
    font-size: 12px;
    font-weight: 850;
}

.board-linked-note-heading svg {
    width: 16px;
    height: 16px;
}

.board-files-dialog .board-dialog-panel {
    width: min(780px, 100%);
    max-height: min(88dvh, 840px);
    overflow: hidden;
}

.board-files-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.board-files-back {
    min-height: 46px;
}

.board-files-back svg {
    transform: rotate(180deg);
}

.board-files-path {
    min-height: 18px;
    margin: -4px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-files-grid {
    display: grid;
    min-height: 210px;
    max-height: min(48dvh, 470px);
    padding: 2px 4px 6px 2px;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    align-content: start;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.board-files-grid[aria-busy="true"] {
    opacity: .55;
}

.board-files-entry {
    min-width: 0;
}

.board-files-item {
    display: grid;
    width: 100%;
    min-width: 0;
    padding: 0;
    gap: 7px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 15px;
    background: color-mix(in srgb, var(--surface) 96%, var(--canvas));
    box-shadow: 0 8px 22px color-mix(in srgb, var(--ink) 6%, transparent);
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.board-files-item:hover,
.board-files-item:focus-visible {
    outline: 0;
    border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
    box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 14%, transparent);
    transform: translateY(-1px);
}

.board-files-item:disabled {
    cursor: wait;
    opacity: .62;
}

.board-files-preview {
    display: grid;
    aspect-ratio: 4 / 3;
    place-items: center;
    color: color-mix(in srgb, var(--accent) 72%, var(--ink));
    background: color-mix(in srgb, var(--accent) 9%, var(--canvas));
    overflow: hidden;
}

.board-files-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.board-files-preview svg {
    width: 42px;
    height: 42px;
}

.board-files-name {
    display: -webkit-box;
    min-height: 42px;
    padding: 0 10px 9px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.board-files-state,
.board-files-limit {
    min-height: 42px;
    margin: 0;
    padding: 11px 13px;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 13px;
    background: color-mix(in srgb, var(--canvas) 70%, transparent);
    font-size: 12px;
    line-height: 1.5;
}

.board-files-limit {
    min-height: 0;
    padding: 8px 11px;
}

.board-files-actions {
    flex-wrap: wrap;
}

.board-shortcut-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.board-shortcut-list > div {
    display: grid;
    min-height: 48px;
    padding: 8px 0;
    grid-template-columns: minmax(145px, .8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--line);
}

.board-shortcut-list > div:last-child {
    border-bottom: 0;
}

.board-shortcut-list dt,
.board-shortcut-list dd {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.board-shortcut-list dd {
    color: var(--ink);
    font-weight: 700;
}

.board-shortcut-list kbd {
    display: inline-grid;
    min-width: 27px;
    min-height: 25px;
    padding: 3px 6px;
    place-items: center;
    color: var(--ink);
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--surface) 90%, var(--canvas));
    box-shadow: 0 2px 5px color-mix(in srgb, var(--ink) 6%, transparent);
    font: inherit;
    font-size: 10px;
    font-weight: 850;
}

[hidden] {
    display: none !important;
}

@media (max-width: 980px) {
    .board-editor-heading h1 {
        max-width: min(31vw, 200px);
    }

    .board-save-state {
        padding: 0 5px;
    }

    .board-editor-topbar .board-title-edit-button,
    .board-editor-topbar [data-board-shortcuts-open] {
        display: none;
    }
}

@media (max-width: 760px) {
    .board-editor-topbar .board-save-state {
        display: none;
    }

    body:has(.boards-editor-page) .main-content {
        position: fixed;
        inset: 0;
        display: grid;
        width: 100%;
        height: 100dvh;
        grid-template-rows: 68px minmax(0, 1fr);
        overflow: hidden;
    }

    body.app-shell-keyboard-focus:has(.boards-editor-page) .main-content {
        top: var(--app-visual-viewport-top, 0px);
        bottom: auto;
        height: var(--app-visual-viewport-height, 100dvh);
    }

    body.sidebar-open .boards-bottom-actionbar {
        opacity: 0;
        pointer-events: none;
        transform: translateY(12px);
    }

    body.sidebar-open .boards-bottom-actionbar > * {
        pointer-events: none;
    }

    body.app-shell-keyboard-focus:has(.boards-library-page) .boards-bottom-actionbar {
        bottom: max(
            calc(var(--app-keyboard-inset, 0px) + 10px),
            calc(env(safe-area-inset-bottom) + 14px)
        );
    }

    body:has(.boards-editor-page) .boards-content {
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 0;
        overflow: hidden;
    }

    .boards-library-page {
        min-height: calc(100dvh - 68px);
    }

    .boards-library-header {
        min-height: 0;
    }

    body .board-editor-topbar,
    body .boards-library-topbar {
        padding: 0 16px;
    }

    body .board-editor-topbar {
        position: relative;
        display: grid;
        grid-template-columns: auto auto minmax(0, 1fr) auto;
        padding-right: 68px;
        justify-content: stretch;
        gap: 8px;
    }

    /*
     * The shared profile action is outside the Board heading/action groups.
     * Pin it in the reserved final slot so CSS Grid cannot wrap it below the
     * editor header when the mobile action row becomes crowded.
     */
    .board-editor-topbar > .topbar-actions {
        position: absolute;
        top: 50%;
        right: 16px;
        z-index: 80;
        margin-left: 0;
        transform: translateY(-50%);
    }

    .boards-library-grid {
        grid-template-columns: 1fr;
    }

    .board-library-card.pc-list-card {
        --pc-swipe-action-size: 64px;
        --pc-swipe-width: calc(var(--pc-swipe-action-count) * var(--pc-swipe-action-size));
        display: block;
        min-height: 84px;
        padding: 0;
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
        touch-action: pan-y pinch-zoom;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .board-library-card:hover,
    .board-library-card:focus-within {
        border-color: transparent;
        box-shadow: none;
        transform: none;
    }

    .board-library-card > .board-library-card-face {
        display: grid;
        min-height: 84px;
        padding: 9px 10px;
        align-items: center;
        border: 1px solid var(--line);
        border-radius: 18px;
        background:
            linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 55%),
            color-mix(in srgb, var(--surface) 94%, var(--canvas));
        touch-action: pan-y pinch-zoom;
    }

    .board-library-card-main {
        min-height: 68px;
        padding: 0;
        grid-template-columns: 56px minmax(0, 1fr);
        grid-template-rows: 56px;
        align-content: center;
        align-items: center;
        gap: 11px;
        border-radius: inherit;
        background: transparent;
        touch-action: pan-y pinch-zoom;
        -webkit-user-drag: none;
    }

    .board-library-card-copy {
        height: 56px;
        padding-right: 0;
        grid-template-rows: auto minmax(0, 1fr) auto;
        align-self: center;
        gap: 0;
    }

    .board-library-card-copy strong {
        font-family: "Manrope", sans-serif;
        font-size: 13px;
        line-height: 1.25;
        letter-spacing: -.02em;
    }

    .board-library-card-info {
        align-self: center;
        font-size: 10px;
        line-height: 1.25;
    }

    .board-library-card-meta {
        align-self: end;
        justify-content: flex-start;
        gap: 7px;
    }

    .board-library-card-meta small {
        font-size: 9px;
        line-height: 1.2;
    }

    .board-library-card-preview {
        width: 56px;
        height: 56px;
        aspect-ratio: 1;
        align-self: center;
        border-radius: 15px;
        background: #151821;
    }

    .board-library-card-preview > img {
        object-fit: contain;
        -webkit-user-drag: none;
    }

    .board-library-shared-badge {
        gap: 4px;
        font-size: 9px;
    }

    .board-library-card-menu {
        display: none;
    }

    .board-library-card > .board-library-card-actions {
        padding: 0;
        background: transparent;
    }

    .board-library-swipe-action {
        display: grid;
        width: 100%;
        min-width: 0;
        min-height: 84px;
        padding: 0 8px;
        place-items: center;
        align-content: center;
        gap: 6px;
        color: #f8fbff;
        border: 0;
        font: inherit;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .01em;
        cursor: pointer;
        touch-action: manipulation;
    }

    .board-library-swipe-action svg {
        width: 20px;
        height: 20px;
    }

    .board-library-swipe-edit {
        background:
            linear-gradient(145deg, rgba(85, 125, 255, .96), rgba(39, 83, 206, .96));
        box-shadow: inset 1px 0 0 rgba(255, 255, 255, .12);
    }

    .board-library-swipe-delete {
        background:
            linear-gradient(145deg, rgba(255, 75, 105, .98), rgba(161, 25, 54, .98));
    }

    .board-library-swipe-action:active {
        filter: brightness(1.08);
    }

    .board-editor-heading,
    .board-editor-actions {
        gap: 5px;
    }

    .board-editor-topbar .board-editor-heading {
        display: contents;
    }

    .board-editor-topbar .board-editor-title {
        position: static;
        width: 100%;
        max-width: 100%;
        grid-column: 3;
        justify-content: center;
        transform: none;
    }

    .board-editor-topbar .board-editor-actions {
        grid-column: 4;
        margin-left: 0;
    }

    .board-editor-heading .pc-icon-button,
    .board-editor-actions .pc-icon-button {
        width: 44px;
        height: 44px;
    }

    .board-editor-heading h1 {
        max-width: 29vw;
        font-size: 14px;
    }

    .board-editor-heading .eyebrow,
    .board-title-edit-button,
    .board-readonly-chip,
    .board-editor-actions [data-board-shortcuts-open] {
        display: none;
    }

    .board-save-state {
        min-width: 16px;
        min-height: 36px;
        padding: 0 4px;
    }

    .board-save-state > span:nth-child(2) {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .board-save-state button:not([hidden]) {
        position: absolute;
        top: 44px;
        right: 6px;
        min-height: 44px;
        padding: 0 12px;
        border: 1px solid currentColor;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .board-tool-palette.pc-panel {
        top: auto;
        right: max(8px, env(safe-area-inset-right));
        bottom: max(8px, env(safe-area-inset-bottom));
        left: max(8px, env(safe-area-inset-left));
        display: grid;
        width: auto;
        height: 62px;
        padding: 4px;
        grid-template-columns: repeat(7, minmax(44px, 1fr));
        align-items: stretch;
        gap: 1px;
        border-radius: 17px;
        transform: none;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }

    .board-shape-picker.pc-panel {
        top: auto;
        right: auto;
        bottom: calc(78px + env(safe-area-inset-bottom));
        left: max(8px, env(safe-area-inset-left));
        transform: none;
    }

    .board-tool-palette::-webkit-scrollbar {
        display: none;
    }

    .board-tool-button,
    .board-tool-icon-only {
        min-width: 44px;
        min-height: 50px;
        padding: 4px;
    }

    .board-tool-button span {
        display: none;
    }

    .board-tool-divider {
        display: none;
    }

    .board-tool-desktop-only {
        display: none;
    }

    .board-zoom-controls.pc-panel {
        right: max(8px, env(safe-area-inset-right));
        bottom: calc(78px + env(safe-area-inset-bottom));
        height: 52px;
        padding: 3px;
    }

    .board-zoom-controls button {
        min-width: 44px;
        height: 44px;
    }

    .board-zoom-controls .board-zoom-value {
        min-width: 54px;
    }

    .board-library-drawer,
    .board-outline-panel {
        top: 8px;
        bottom: 8px;
        width: min(380px, calc(100% - 16px));
    }

    .board-library-drawer {
        left: 8px;
    }

    .board-outline-panel {
        right: 8px;
    }

    .board-dialog {
        padding: 10px;
        place-items: end center;
    }

    .board-dialog-panel {
        width: 100%;
        max-height: min(84dvh, 760px);
        padding: 16px;
        border-radius: 21px 21px 15px 15px;
    }

    .board-properties-dialog .board-dialog-panel {
        max-height: calc(100dvh - 20px);
        padding: 14px;
        gap: 12px;
        border-radius: 22px 22px 15px 15px;
    }

    .board-properties-dialog .board-dialog-header {
        position: relative;
        padding-top: 8px;
        cursor: grab;
        touch-action: none;
    }

    .board-properties-dialog .board-dialog-header::before {
        position: absolute;
        top: -4px;
        left: 50%;
        width: 42px;
        height: 4px;
        content: "";
        border-radius: 999px;
        background: color-mix(in srgb, var(--muted) 42%, transparent);
        transform: translateX(-50%);
    }

    .board-properties-dialog.is-properties-dragging .board-dialog-panel,
    .board-properties-dialog.is-properties-settling .board-dialog-panel {
        /* A resting transform makes fixed listboxes relative to this sheet in
           mobile WebKit. Transform only while the swipe gesture owns it. */
        transform: translate3d(0, var(--board-properties-dismiss-y, 0px), 0);
        will-change: transform;
    }

    .board-properties-dialog.is-properties-dragging .board-dialog-header {
        cursor: grabbing;
    }

    .board-properties-dialog.is-properties-settling .board-dialog-panel {
        transition: transform .18s cubic-bezier(.22, .8, .32, 1);
    }

    .board-properties-scroll {
        padding-right: 1px;
        padding-left: 1px;
        scrollbar-gutter: auto;
    }

    .board-dialog-actions .pc-action {
        flex: 1;
    }

    .board-properties-actions .pc-action {
        flex: 0 1 auto;
        min-width: 132px;
    }

    .board-files-dialog .board-dialog-panel {
        max-height: 90dvh;
    }

    .board-notes-dialog .board-dialog-panel {
        max-height: 90dvh;
    }

    .board-notes-list {
        min-height: 170px;
        max-height: 40dvh;
    }

    .board-notes-actions .pc-action:first-child {
        flex-basis: 58%;
    }

    .board-files-grid {
        min-height: 180px;
        max-height: 42dvh;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .board-files-actions .pc-action:first-child {
        flex-basis: 62%;
    }

    .board-shortcut-list > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

@media (max-width: 440px) {
    .board-editor-title {
        max-width: 100%;
    }

    .board-editor-heading h1 {
        max-width: 100%;
    }

    .board-properties-columns {
        grid-template-columns: 1fr;
    }

    .board-properties-dialog .board-properties-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .board-files-toolbar {
        grid-template-columns: minmax(0, 1fr) 46px;
    }

    .board-files-back {
        width: 46px;
        min-width: 46px;
        padding: 0;
    }

    .board-files-back span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .board-linked-note-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .board-linked-note-heading .pc-action {
        width: 100%;
    }

    .board-zoom-controls .board-zoom-value {
        display: none;
    }
}

@media (max-width: 360px) {
    .board-properties-dialog .board-properties-columns {
        grid-template-columns: 1fr;
    }

    .board-properties-layer {
        padding-left: 9px;
        gap: 8px;
    }

    .board-layer-stepper {
        min-width: 134px;
        grid-template-columns: 44px minmax(42px, 1fr) 44px;
    }
}

@media (max-width: 390px) {
    .boards-bottom-actionbar {
        right: 10px;
        left: 10px;
        width: calc(100% - 20px);
        gap: 8px;
    }

    .board-library-search-field {
        height: 54px;
    }

    .board-bottom-create {
        width: 54px;
        min-width: 54px;
        height: 54px;
        min-height: 54px;
    }
}

@media (max-width: 429px) {
    .board-tool-palette.pc-panel {
        height: 111px;
        grid-template-columns: repeat(8, minmax(0, 1fr));
        grid-template-rows: repeat(2, 50px);
        overflow: hidden;
    }

    .board-tool-palette .board-tool-button {
        grid-column: span 2;
    }

    .board-zoom-controls.pc-panel {
        bottom: calc(127px + env(safe-area-inset-bottom));
    }

    .board-shape-picker.pc-panel {
        bottom: calc(127px + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .board-library-card,
    .board-library-card-actions,
    .board-tool-button,
    .pc-icon-button,
    .pc-action,
    .board-select-toggle svg {
        transition: none !important;
    }

    .board-select-menu {
        animation: none;
    }

    .board-properties-dialog.is-properties-settling .board-dialog-panel {
        transition: none;
    }

    .board-context-menu {
        animation: none;
    }

    .board-save-state.is-saving .board-save-dot,
    .board-upload-spinner {
        animation-duration: 2s;
    }
}
