/*
 * choku-reader.css
 * 読む人の画面（mypage-reader.php）・読む人のページ（reader-profile.php）・「応援する」ボタン
 * ボタンは作り手メンバーのページでも読み込む（mu-plugins/choku/members/reader.php の choku_ouen_enqueue()）
 */

/* ---------- 応援する ---------- */
.choku-ouen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    align-self: center;
    padding-top: 20px;
}
.choku-ouen__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 22px;
    border: 1.5px solid var(--choku-key, #bb5548);
    border-radius: 999px;
    background: #fff;
    color: var(--choku-key, #bb5548);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.choku-ouen__btn:hover {
    background: color-mix(in srgb, var(--choku-key, #bb5548) 8%, #fff);
}
.choku-ouen__mark {
    width: 14px;
    height: 14px;
    background: currentColor;
    /* ハート */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.1C.9 8.6 3 5 6.6 5c2.1 0 3.6 1.2 4.4 2.5C11.8 6.2 13.3 5 15.4 5 19 5 21.1 8.6 19.6 11.9 17.5 16.4 12 21 12 21z' fill='none' stroke='black' stroke-width='2.2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.1C.9 8.6 3 5 6.6 5c2.1 0 3.6 1.2 4.4 2.5C11.8 6.2 13.3 5 15.4 5 19 5 21.1 8.6 19.6 11.9 17.5 16.4 12 21 12 21z' fill='none' stroke='black' stroke-width='2.2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.choku-ouen.is-on .choku-ouen__btn {
    background: var(--choku-key, #bb5548);
    color: #fff;
}
.choku-ouen.is-on .choku-ouen__mark {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.1C.9 8.6 3 5 6.6 5c2.1 0 3.6 1.2 4.4 2.5C11.8 6.2 13.3 5 15.4 5 19 5 21.1 8.6 19.6 11.9 17.5 16.4 12 21 12 21z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.1C.9 8.6 3 5 6.6 5c2.1 0 3.6 1.2 4.4 2.5C11.8 6.2 13.3 5 15.4 5 19 5 21.1 8.6 19.6 11.9 17.5 16.4 12 21 12 21z'/%3E%3C/svg%3E");
}
.choku-ouen.is-busy .choku-ouen__btn {
    opacity: .6;
    cursor: wait;
}
.choku-ouen__count {
    font-size: 12px;
    color: var(--choku-ink-sub, #6b6260);
}
.choku-ouen__btn[hidden],
.choku-ouen__count[hidden] {
    display: none;
}
.choku-ouen--small {
    padding-top: 0;
    flex-direction: row;
}
.choku-ouen--small .choku-ouen__btn {
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
}
.choku-ouen--small .choku-ouen__count {
    display: none;
}

/* 応援した直後のお知らせ */
.choku-ouen-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 100;
    max-width: calc(100% - 32px);
    margin: 0;
    padding: 12px 20px;
    border-radius: 12px;
    background: var(--choku-ink, #2b2523);
    color: #fff;
    font-size: 14px;
    transform: translateX(-50%);
    animation: choku-ouen-toast 5s forwards;
}
@keyframes choku-ouen-toast {
    0%, 85% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

/* ---------- アイコン ---------- */
.choku-rd-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    background: #f1ebe8;
}
.choku-rd-icon--text {
    color: var(--choku-key, #bb5548);
    font-family: "Noto Serif JP", serif;
    font-weight: 600;
}

/* ---------- マイページ（読む人） ---------- */
.choku-rd-mp .choku-acc-field input[type="url"],
.choku-rd-mp .choku-acc-field textarea {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--choku-line, #e4dedb);
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
    line-height: 1.7;
    box-sizing: border-box;
}
.choku-rd-mp .choku-acc-field input[type="url"] + input[type="url"] {
    margin-top: 2px;
}
.choku-rd-opt {
    margin-left: 6px;
    font-size: 12px;
    font-weight: 400;
    color: var(--choku-ink-sub, #6b6260);
}
.choku-rd-iconset {
    display: flex;
    align-items: center;
    gap: 16px;
}
.choku-rd-iconset > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}
.choku-rd-small {
    font-size: 13px;
}
.choku-rd-target {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--choku-key, #bb5548) 8%, #fff);
    font-size: 14px;
    font-weight: 700;
}
.choku-rd-me {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}
.choku-rd-me__body {
    flex: 1;
    min-width: 0;
}
.choku-rd-me__name {
    font-size: 17px;
    font-weight: 700;
}
.choku-rd-num {
    display: inline-block;
    min-width: 1.6em;
    padding: 0 8px;
    border-radius: 999px;
    background: #f1ebe8;
    font-size: 13px;
    text-align: center;
}
.choku-rd-makers {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}
.choku-rd-maker {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--choku-line, #e4dedb);
}
.choku-rd-maker__link {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}
.choku-rd-maker__logo {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: #f1ebe8;
    color: var(--choku-key, #bb5548);
    font-weight: 700;
}
.choku-rd-maker__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.choku-rd-maker__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.choku-rd-maker__name {
    font-weight: 700;
}
.choku-rd-maker__meta {
    overflow: hidden;
    font-size: 12px;
    color: var(--choku-ink-sub, #6b6260);
    white-space: nowrap;
    text-overflow: ellipsis;
}
.choku-rd-diaries {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

/* ---------- 読む人のページ（/u/〇〇/） ---------- */
.choku-rd {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 0 56px;
    color: var(--choku-ink, #2b2523);
}
.choku-rd-head {
    position: relative;
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin-bottom: 40px;
    padding: 32px;
    border-radius: 20px;
    background: #fff;
}
.choku-rd-head__text {
    flex: 1;
    min-width: 0;
}
.choku-rd-head__name {
    margin: 0;
    font-family: "Noto Serif JP", serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.4;
}
.choku-rd-head__name::before,
.choku-rd-head__name::after,
.choku-rd-sec__title::before,
.choku-rd-sec__title::after {
    content: none;
}
.choku-rd-head__since {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--choku-ink-sub, #6b6260);
}
.choku-rd-head__bio {
    margin: 14px 0 0;
    font-size: 15px;
    line-height: 1.9;
}
.choku-rd-head__own {
    margin: 14px 0 0;
    font-size: 14px;
}
.choku-rd-head__own a {
    color: var(--choku-key, #bb5548);
}
.choku-rd-head__edit {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 13px;
    color: var(--choku-key, #bb5548);
}
.choku-rd-sns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}
.choku-rd-sns a {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--choku-line, #e4dedb);
    border-radius: 999px;
    color: inherit;
    font-size: 13px;
    text-decoration: none;
}
.choku-rd-sns__label {
    font-weight: 700;
}
.choku-rd-sns__name {
    color: var(--choku-ink-sub, #6b6260);
}
.choku-rd-sec__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    font-size: 20px;
}
.choku-rd-sec__note {
    font-size: 14px;
    color: var(--choku-ink-sub, #6b6260);
}
.choku-rd-sec__note a {
    color: var(--choku-key, #bb5548);
}

@media (max-width: 600px) {
    .choku-ouen {
        align-self: flex-start;
        padding-top: 0;
        flex-direction: row;
        gap: 10px;
    }
    .choku-rd-diaries {
        grid-template-columns: 1fr 1fr;
    }
    .choku-rd-head {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 28px 20px 24px;
        text-align: center;
    }
    .choku-rd-head .choku-rd-icon {
        width: 96px !important;
        height: 96px !important;
    }
    .choku-rd-head__name {
        font-size: 24px;
    }
    .choku-rd-sns {
        justify-content: center;
    }
    .choku-rd-head__edit {
        position: static;
    }
    .choku-rd-me {
        flex-direction: column;
    }
}
