.note-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.note-toolbar h2,
.note-public h1 {
    overflow-wrap: anywhere;
}

.note-count {
    margin: 2px 0 0;
}

.note-layout,
.note-editor-layout {
    display: flex;
    align-items: stretch;
    gap: 16px;
    min-height: calc(100vh - 180px);
}

.note-sheet,
.note-editor,
.note-card {
    background: #fff;
    border: 1px solid #e6eaed;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 40, 50, 0.04);
}

.note-card {
    overflow-x: auto;
}

.note-sheet,
.note-editor {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    padding: 28px;
}

.note-sheet {
    overflow: auto;
}

.note-side {
    width: 300px;
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.note-title {
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e6eaed;
    font-size: 28px;
    font-weight: 500;
    color: #10242c;
}

.note-body,
.note-content-input {
    font-size: 16px;
    line-height: 1.65;
    color: #24343b;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.note-meta {
    font-size: 13px;
    color: #5f6368;
}

.note-meta strong {
    color: #10242c;
    font-weight: 600;
}

.note-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.note-actions form,
.note-actions .btn {
    width: 100%;
}

.note-link {
    width: 100%;
    border: 1px solid #d5dee3;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    color: #24343b;
    background: #f7fbfb;
}

.note-qr {
    width: 168px;
    height: 168px;
    border-radius: 12px;
    border: 1px solid #e6eaed;
    padding: 6px;
    background: #fff;
}

.note-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.note-table th {
    padding: 10px 12px;
    border-bottom: 1px solid #e6eaed;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5f6368;
    text-align: left;
}

.note-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f4f6;
    vertical-align: middle;
}

.note-table tbody tr:hover {
    background: #f3fbfb;
}

.note-title-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #10242c;
    font-weight: 600;
    text-decoration: none;
}

.note-title-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-title-link:hover {
    color: #0f80aa;
    text-decoration: none;
}

.note-preview {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #5f6368;
}

.note-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.note-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.note-pill.public { background: #e5f6f6; color: #0c6484; }
.note-pill.private { background: #fdecea; color: #b42318; }
.note-pill.locked { background: #fff6df; color: #8a5a00; }

.note-icon-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5f6368;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.note-icon-btn:hover {
    background: rgba(15, 128, 170, 0.1);
    color: #0f80aa;
}

.note-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 2px;
}

.note-editor {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.note-title-input,
.note-content-input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: #10242c;
}

.note-title-input {
    padding: 22px 24px 14px;
    font-size: 26px;
    font-weight: 500;
    border-bottom: 1px solid #e6eaed;
}

.note-content-input {
    flex: 1;
    min-height: 360px;
    padding: 18px 24px 24px;
    resize: vertical;
}

.note-setting {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.note-setting p {
    margin: 2px 0 0;
    color: #5f6368;
    font-size: 12px;
    line-height: 1.4;
}

.note-pages {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.note-public {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: #f4f8f8;
    color: #10242c;
    font-family: Roboto, "Segoe UI", sans-serif;
}

.note-public-bar,
.note-public-main {
    width: min(880px, calc(100% - 32px));
    margin: 0 auto;
}

.note-public-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
}

.note-public-bar img {
    display: block;
    height: 36px;
    width: auto;
}

.note-public-main {
    padding-bottom: 48px;
}

.note-public .note-sheet {
    padding: 32px;
}

.note-public-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.note-public-actions .btn {
    width: auto;
}

.note-denied {
    padding: 28px;
    text-align: center;
}

@media (max-width: 800px) {
    .note-layout,
    .note-editor-layout {
        flex-direction: column;
        min-height: 0;
    }

    .note-side {
        width: 100%;
    }

    .note-preview-col,
    .note-updated {
        display: none;
    }

    .note-table {
        table-layout: fixed;
    }

    .note-title-link span {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .note-title {
        font-size: 24px;
    }

    .note-sheet,
    .note-public .note-sheet {
        padding: 20px;
    }

    .note-public-bar,
    .note-public-main {
        width: min(880px, calc(100% - 24px));
    }

    .note-title-input {
        font-size: 22px;
        padding: 18px 16px 12px;
    }

    .note-content-input {
        padding: 16px;
    }

    .note-public-actions .btn {
        flex: 1 1 calc(50% - 8px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .note-table tbody tr,
    .note-icon-btn {
        transition: none;
    }
}
