@charset "utf-8";

.diary-paper[data-post-type="memo"] {
    --memo-checklist-reserved-width: 18px;
    min-height: 0;
    padding-top: 18px;
}

.memo-corner-badge {
    position: absolute;
    top: 13px;
    right: 30px;
    z-index: 12;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.memo-corner-badge img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.diary-paper[data-post-type="memo"] .diary-content-area {
    min-height: 0;
    height: auto;
    max-height: none;
    padding: 0;
    overflow: hidden;
}

.diary-paper[data-post-type="memo"].edit-mode .diary-content-area {
    overflow: hidden;
}

.diary-paper[data-post-type="memo"] .memo-text-underlay {
    padding: 8px calc(30px + var(--memo-checklist-reserved-width)) 8px 30px;
}

.diary-paper[data-post-type="memo"] .memo-textarea {
    min-height: 38px;
    height: 38px;
    max-height: 126px;
    padding: 8px calc(30px + var(--memo-checklist-reserved-width)) 8px 30px;
    overflow: hidden;
}

.diary-paper[data-post-type="memo"] .post-actions {
    margin-top: 14px;
    padding-top: 8px;
}

.memo-hidden {
    display: none !important;
}

.memo-lines {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px 30px 8px 30px;
    font: inherit;
    color: inherit;
    line-height: 22px;
    box-sizing: border-box;
}

.diary-paper[data-post-type="memo"].memo-checklist-mode .memo-lines {
    display: flex;
}

.memo-line-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
}

.memo-line-text-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 22px;
}

.memo-line-underlay {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    display: flex;
    align-items: center;
    pointer-events: none;
    color: transparent;
    font: inherit;
    line-height: inherit;
    white-space: nowrap;
    overflow: hidden;
}

.memo-line-underlay span {
    display: block;
    width: 100%;
    border-radius: 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.memo-line-row.memo-line-hidden {
    display: none;
}

.memo-line-check {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(111, 70, 30, 0.45);
    background: rgba(255, 255, 255, 0.88);
    flex-shrink: 0;
    position: relative;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.memo-line-check.enabled {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

.memo-line-check.enabled:active {
    transform: scale(0.92);
}

.memo-line-check.checked {
    background: #d4a373;
    border-color: #d4a373;
}

.memo-line-check.checked::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 4px;
    height: 2px;
    border-left: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
    transform: rotate(-45deg);
}

.memo-line-input {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    height: 22px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    overflow: hidden;
    text-overflow: clip;
    transition: color 0.2s ease, opacity 0.2s ease, text-decoration-color 0.2s ease;
}

.memo-line-input[readonly] {
    cursor: default;
}

.memo-lines.glass-light .memo-line-underlay span {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.memo-lines.glass-dark .memo-line-underlay span {
    background: rgba(0, 0, 0, 0.25);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.diary-paper:not(.edit-mode) .memo-line-input {
    padding: 0;
    pointer-events: none;
}

.memo-line-row.checked .memo-line-input {
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    text-decoration-color: currentColor;
    opacity: 0.65;
}

.diary-paper:not(.edit-mode) .memo-check-insert-btn {
    display: none !important;
}
