* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #efefef;
    color: #111827;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.page-top {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 14px;
    padding-left: 2px;
}

.page-top a {
    color: #2563eb;
    text-decoration: none;
}

.page-top a:hover {
    text-decoration: underline;
}

.card {
    background: #f8f8f8;
    border: 1px solid #d6d9df;
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 18px;
}

h1 {
    font-size: 42px;
    margin-bottom: 24px;
    color: #111827;
    text-align: center;
}

input {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #cfd4dc;
    background: #ffffff;
    color: #111827;
    font-size: 16px;
    margin-bottom: 24px;
    outline: none;
}

input:focus {
    border-color: #9ca3af;
}

.title-input {
    font-size: 22px;
    font-weight: 600;
}

.link-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.link-input {
    margin-bottom: 0;
    text-align: center;
    font-weight: 600;
    padding: 14px 8px;
}

.side-link {
    flex: 1;
}

.current-link {
    flex: 1.6;
    background: #f3f4f6;
}

button {
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid #cfd4dc;
    background: #e5e7eb;
    color: #111827;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 0;
}

button:hover {
    background: #dfe3e8;
}

.menu-button {
    display: block;
    width: 100%;
    padding: 18px;
    margin-bottom: 0;
    border-radius: 16px;
    border: 1px solid #cfd4dc;
    background: #e5e7eb;
    color: #111827;
    text-align: center;
    text-decoration: none;
    font-size: 18px;
    transition: 0.2s;
}

.menu-button:hover {
    background: #dfe3e8;
}

.menu-button.danger {
    background: #e5e7eb;
    border: 1px solid #cfd4dc;
    color: #111827;
}

.muted {
    color: #6b7280;
    text-align: center;
    margin-bottom: 24px;
}

.error {
    color: #dc2626;
    margin-bottom: 20px;
    text-align: center;
}

.password-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.password-toggle-inline {
    cursor: pointer;
    user-select: none;
    margin-bottom: 8px;
}

/* EDIT MODE */

.paragraphs-editor {
    border: 1px solid #cfd4dc;
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 24px;
}

.paragraphs-editor textarea {
    display: block;
    width: 100%;
    min-height: 56px;
    padding: 16px;
    border: none;
    border-bottom: 1px solid #d6d9df;
    border-radius: 0;
    margin: 0;
    background: #ffffff;
    color: #111827;
    font-size: 16px;
    line-height: 1.5;
    outline: none;
    resize: none !important;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

.paragraphs-editor textarea:last-child {
    border-bottom: none;
}

.paragraphs-editor textarea:focus {
    background: #f9fafb;
    box-shadow: inset 3px 0 0 #cfd4dc;
}

/* VIEW MODE */

.paragraphs-view {
    display: flex;
    flex-direction: column;

    gap: 0;

    margin-bottom: 24px;

    border: 1px solid #d6d9df;

    border-radius: 14px;

    background: #ffffff;

    overflow: hidden;

}

.paragraph-view {
    background: #ffffff;

    border-bottom: 1px solid #d6d9df;

    border-radius: 0;

    padding: 16px;
    font-size: 16px;
    line-height: 1.5;

    white-space: pre-wrap;

    overflow-wrap: break-word;
    word-break: break-word;

    box-shadow: none;
}



.paragraph-view:first-child {
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

.paragraph-view:last-child {
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    border-bottom: none;
}


.paragraph-view:target {
    background: #f3f4f6;
    border-color: #9ca3af;
    box-shadow:
        inset 4px 0 0 #9ca3af,
        0 4px 10px rgba(0,0,0,0.04);
}

.paragraph-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.paragraph-link:hover {
    text-decoration: underline;
}

.copy-link {
    cursor: pointer;
    
    opacity: 0.35;
    user-select: none;
    
    margin-top: 1px;
    transition: 0.15s;
}

.copy-link:hover {
    opacity: 1;
}

.copy-link.copied {
    opacity: 1;
    color: #16a34a;
}

.backlinks {
    margin-top: 0px;

    gap: 2px;
}

.backlink-item {
    font-size: 13px;

    color: #2563eb;

    text-decoration: none;

    opacity: 0.8;
}

.backlink-item:hover {
    text-decoration: underline;

    opacity: 1;
}

.timer-active {
    color: #16a34a;
    font-weight: 700;
}