/*--main--*/
main {
    margin: 0 auto;
    padding: 2.5%;
    display: flex;
    flex-direction: column;
    color: var(--fg-color);
    background-color: transparent;
}

@media (min-width: 767.98px) {
    main {
        padding: 25px;
        max-width: 1000px;
    }
}

.container {
    position: relative;
    padding: 2.5%;
    margin: 0 auto;
    align-items: center;
    text-align: center;
    max-height: 100%;
}

@media (min-width: 767.98px) {
    .container {
        padding: 25px 10px;
    }
}

.title {
    align-items: center;
    text-align: left;
    max-height: 100%;
}

.title h1 {
    font-size: clamp(2.0rem, calc(1.8rem + 0.625vw), 2.5rem);
}

/*--note-search--*/
.note-search {
    margin-top: 20px;
}

.note-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5em 0.9em;
    border: 1px solid var(--fg-color);
    border-radius: 999px;
    background: transparent;
    color: var(--fg-color);
    font-size: var(--font-size-small);
}

.note-search-input::placeholder {
    color: var(--fg-color);
    opacity: 0.5;
}

.note-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

/*--note-search--*/

/*--note-filters--*/
.note-filters {
    margin-top: 20px;
    /* JS描画前(空の状態)でも1行分の高さを確保し、レイアウトシフトを抑える */
    min-height: 2.6em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
    justify-content: flex-start;
}

.note-filter-button {
    padding: 0.4em 0.9em;
    border: 1px solid var(--fg-color);
    border-radius: 999px;
    background: transparent;
    color: var(--fg-color);
    font-size: var(--font-size-small);
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.note-filter-button:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.note-filter-button.is-active {
    background-color: var(--fg-color);
    border-color: var(--fg-color);
    color: var(--bg-color);
}

/*--note-filters--*/

/*--note-subfilters--*/
.note-subfilters {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    justify-content: flex-start;
}

.note-subfilters:empty {
    margin-top: 0;
}

.note-subfilter-button {
    padding: 0.3em 0.8em;
    border: 1px solid rgba(128, 128, 128, 0.5);
    border-radius: 999px;
    background: transparent;
    color: var(--fg-color);
    opacity: 0.75;
    font-size: var(--font-size-small);
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, opacity 0.3s;
}

.note-subfilter-button:hover {
    opacity: 1;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.note-subfilter-button.is-active {
    opacity: 1;
    background-color: var(--fg-color);
    border-color: var(--fg-color);
    color: var(--bg-color);
}

/*--note-subfilters--*/

/*--note-list--*/
.note-list {
    margin-top: 10px;
    /* JS描画前(空の状態)でもおおよその一覧の高さを確保し、レイアウトシフトを抑える。
       記事数に応じた厳密な値ではないため完全には防げないが、体感の大きなジャンプは軽減できる */
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    gap: 0.9em;
}

.note-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1em;
    padding-bottom: 0.9em;
    border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}

.note-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}

.note-item-content a {
    font-size: var(--font-size-nav);
}

.note-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin: 0.3em 0 0;
    opacity: 0.6;
    font-size: var(--font-size-small);
}

.note-item-favorite {
    position: relative;
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--fg-color);
    font-size: var(--font-size-nav);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s, color 0.3s;
}

.note-item-favorite:hover,
.note-item-favorite.is-active {
    opacity: 1;
    color: var(--accent-color);
}

.note-empty {
    margin-top: 10px;
    opacity: 0.6;
}

/*--note-list--*/
