﻿.memo-page {
    min-height: 100vh;
    padding: 16px 12px;
    background: var(--sc-page-bg);
    color: var(--sc-text);
}

.memo-menu {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 14px;
}

.memo-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    height: 42px;
    border: 0;
    border-radius: var(--sc-radius-sm);
    background: var(--sc-card-bg);
    color: #334155;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.memo-list-card {
    min-height: calc(100vh - 220px);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    background: var(--sc-card-bg);
    box-shadow: var(--sc-shadow);
    backdrop-filter: blur(20px);
    padding: 20px;
}

.memo-list-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.memo-list-top h2 {
    margin: 0;
    color: var(--sc-text);
    font-size: 22px;
    font-weight: var(--sc-font-heavy);
}

.memo-write-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    background: var(--sc-purple);
    color: white;
    font-size: 14px;
    font-weight: var(--sc-font-heavy);
    padding: 0 18px;
    cursor: pointer;
}

.memo-row {
    width: 100%;
    min-height: 86px;
    display: flex;
    gap: 12px;
    align-items: stretch;
    border: 1px solid var(--sc-line);
    border-radius: var(--sc-radius-sm);
    background: var(--sc-soft-bg);
    padding: 14px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    text-align: left;
}

.memo-row:hover {
    background: var(--sc-card-bg-strong);
}

.memo-main {
    min-width: 0;
    width: 100%;
    display: grid;
    gap: 7px;
}

.memo-title-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.memo-title {
    min-width: 0;
    overflow: hidden;
    color: var(--sc-accent);
    font-size: 18px;
    font-weight: var(--sc-font-heavy);
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.memo-title-row strong {
    flex: 0 0 auto;
    color: var(--sc-text);
    font-size: 13px;
    font-weight: var(--sc-font-heavy);
    white-space: nowrap;
}

.memo-preview {
    min-width: 0;
    overflow: hidden;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.memo-writer {
    color: var(--sc-muted);
    font-size: 13px;
    font-weight: var(--sc-font-heavy);
}

.memo-delete-btn {
    align-self: center;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    border: 1px solid rgba(239,68,68,.24);
    border-radius: 999px;
    background: rgba(255,255,255,.8);
    color: var(--sc-danger);
    font-size: 13px;
    font-weight: var(--sc-font-heavy);
    padding: 0 14px;
    cursor: pointer;
}

.memo-editor-backdrop {
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,23,42,.34);
    padding: 24px;
}

.memo-editor {
    width: min(1000px, 100%);
    height: min(740px, calc(100vh - 48px));
    display: grid;
    grid-template-rows: 42px auto 1fr auto;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f8f9fb;
    box-shadow: var(--sc-shadow-strong);
    overflow: hidden;
}

.memo-window-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
    background: #f3f4f6;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    padding: 0 10px 0 14px;
}

.memo-window-bar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #111827;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.memo-window-bar button:hover {
    background: #fee2e2;
    color: #991b1b;
}

.memo-editor-title {
    width: 100%;
    height: 56px;
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    outline: 0;
    background: #fff;
    color: #111827;
    font-size: 20px;
    font-weight: var(--sc-font-heavy);
    padding: 0 16px;
}

.memo-editor-content {
    width: 100%;
    min-width: 0;
    min-height: 0;
    border: 0;
    outline: 0;
    resize: none;
    background: #fff;
    color: #111827;
    font-family: Consolas, "Courier New", monospace;
    font-size: 16px;
    line-height: 1.7;
    padding: 16px;
}

.memo-editor-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #e5e7eb;
    background: #f3f4f6;
    padding: 10px 12px;
}

.memo-editor-footer button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: var(--sc-accent-strong);
    color: white;
    font-size: 14px;
    font-weight: var(--sc-font-heavy);
    padding: 0 18px;
    cursor: pointer;
}

@media (max-width: 820px) {
    .memo-page {
        padding: 14px;
    }

    .memo-home-btn {
        min-width: 0;
        height: 36px;
        padding: 0 14px;
        font-size: 12px;
    }

    .memo-list-card {
        min-height: calc(100vh - 210px);
        padding: 18px;
    }

    .memo-row {
        gap: 8px;
        padding: 12px;
    }

    .memo-title {
        font-size: 16px;
    }

    .memo-delete-btn {
        height: 32px;
        padding: 0 10px;
        font-size: 12px;
    }

    .memo-editor-backdrop {
        padding: 12px;
    }

    .memo-editor {
        height: calc(100vh - 24px);
    }
}
