/* =========================
   推し詳細ページ
   oshi-details.css
========================= */


/* =========================
   ページ全体
========================= */

#oshiDetailPage{

    padding:15px;

    max-width:900px;

    margin:0 auto;

}





/* =========================================
   📸 推しページ・ギャラリープレビュー
========================================= */

.oshi-home-gallery-preview {
    width: 100%;
    min-width: 0;
    margin: 16px 0;
}

.oshi-home-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

.oshi-home-gallery-photo {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    background: linear-gradient(135deg, #f2eaff, #e4f4ff);
    box-shadow: 0 3px 10px rgba(133, 113, 180, 0.12);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.oshi-home-gallery-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oshi-home-gallery-view-all {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    padding: 10px 14px;
    border: 1px solid #dfd1f5;
    border-radius: 14px;
    background: #fffaff;
    color: #8065ad;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.oshi-home-gallery-empty {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px 12px;
    border: 1px dashed #d8c9ef;
    border-radius: 18px;
    background: linear-gradient(135deg, #fbf6ff, #f0f8ff);
    color: #8c7aa8;
    text-align: center;
}

.oshi-home-gallery-empty > span {
    color: #c4a5e8;
    font-size: 30px;
    line-height: 1;
}

.oshi-home-gallery-empty p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.oshi-home-gallery-empty small {
    color: #a397b6;
    font-size: 12px;
}

@media (max-width: 360px) {
    .oshi-home-gallery-grid {
        gap: 6px;
    }

    .oshi-home-gallery-photo {
        border-radius: 10px;
    }
}








/* =====================================================
   💜 推しのページ — パステル・ファンタジーデザイン
   天音レンのイメージ / スマートフォン対応
===================================================== */

#oshiDetailPage.oshi-home-page {
    --oshi-lavender: #a995dc;
    --oshi-purple: #8067b5;
    --oshi-pink: #f1c5df;
    --oshi-blue: #cce8fa;
    --oshi-ink: #66567f;
    --oshi-muted: #998ba9;
    --oshi-border: #eee4f8;

    box-sizing: border-box;
    width: 100%;
    max-width: 760px;
    min-height: 100%;
    margin: 0 auto;
    padding: 0 15px 30px;
    overflow-wrap: anywhere;
    color: var(--oshi-ink);
    background:
        radial-gradient(ellipse at 5% 8%, rgba(237, 214, 250, .35), transparent 32%),
        radial-gradient(ellipse at 95% 25%, rgba(202, 231, 250, .35), transparent 30%),
        #fffaff;
    font-family:
        -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
        "Yu Gothic", Meiryo, sans-serif;
}

#oshiDetailPage.oshi-home-page *,
#oshiDetailPage.oshi-home-page *::before,
#oshiDetailPage.oshi-home-page *::after {
    box-sizing: border-box;
}

#oshiDetailPage.oshi-home-page button,
#oshiDetailPage.oshi-home-page a {
    -webkit-tap-highlight-color: transparent;
}

#oshiDetailPage.oshi-home-page button {
    font: inherit;
}

/* -------------------------
   ヘッダー
------------------------- */

#oshiDetailPage .oshi-home-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 10px 0;
}

#oshiDetailPage .oshi-home-back,
#oshiDetailPage .oshi-home-icon-button {
    display: flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(221, 206, 242, .8);
    border-radius: 15px;
    background: rgba(255, 255, 255, .86);
    color: var(--oshi-purple);
    font-size: 25px;
    cursor: pointer;
}

#oshiDetailPage .oshi-home-header-title {
    flex: 1;
    min-width: 0;
    text-align: center;
}

#oshiDetailPage .oshi-home-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #b19bcd;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
}

#oshiDetailPage .oshi-home-header .oshi-detail-title {
    margin: 0;
    color: #79649e;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .04em;
}

#oshiDetailPage .oshi-home-header-actions {
    display: flex;
    gap: 6px;
}

#oshiDetailPage .oshi-home-header-actions .oshi-home-icon-button {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 13px;
    font-size: 21px;
}

/* -------------------------
   メインビジュアル
------------------------- */

#oshiDetailPage .oshi-home-hero {
    position: relative;
    isolation: isolate;
    padding: 25px 15px 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 27px;
    background:
        radial-gradient(circle at 15% 20%, rgba(255,255,255,.8), transparent 23%),
        radial-gradient(circle at 90% 70%, rgba(255,255,255,.65), transparent 25%),
        linear-gradient(145deg, #eee1ff 0%, #e2edff 47%, #ffe5f1 100%);
    box-shadow: 0 8px 25px rgba(156, 129, 190, .13);
}

#oshiDetailPage .oshi-home-hero-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    color: #8c77b4;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-align: center;
}

#oshiDetailPage .oshi-home-hero-label span {
    color: #d79ecb;
    font-size: 15px;
}

#oshiDetailPage .oshi-home-main-photo-wrap {
    position: relative;
    width: min(100%, 320px);
    margin: 0 auto;
}

#oshiDetailPage .oshi-main-photo-placeholder,
#oshiDetailPage .oshi-home-main-photo-button {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 0;
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, .9);
    border-radius: 25px;
    background: linear-gradient(145deg, #dcd2f4, #d8eafa, #f8dced);
    box-shadow: 0 9px 25px rgba(113, 89, 157, .2);
}

#oshiDetailPage .oshi-main-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
    color: #79649e;
    font-size: 13px;
    cursor: pointer;
}

#oshiDetailPage .oshi-main-photo-placeholder .oshi-home-photo-placeholder-icon {
    font-size: 45px;
}

#oshiDetailPage .oshi-main-photo-placeholder small {
    color: #9381ad;
    font-size: 11px;
}

#oshiDetailPage .oshi-home-main-photo-button {
    position: relative;
    cursor: pointer;
}

#oshiDetailPage .oshi-home-main-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#oshiDetailPage .oshi-home-main-photo-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 30px;
    background: rgba(255, 255, 255, .86);
    color: #896eb1;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .6px;
}

#oshiDetailPage .oshi-home-hero-decoration,
#oshiDetailPage .oshi-home-photo-sparkle {
    position: absolute;
    z-index: -1;
    color: rgba(255, 255, 255, .9);
    pointer-events: none;
}

#oshiDetailPage .oshi-home-decoration-one {
    top: 24%;
    left: 7%;
    font-size: 28px;
}

#oshiDetailPage .oshi-home-decoration-two {
    right: 8%;
    bottom: 27%;
    color: #fff;
    font-size: 35px;
}

#oshiDetailPage .oshi-home-decoration-three {
    top: 47%;
    right: 8%;
    font-size: 22px;
}

#oshiDetailPage .oshi-home-photo-sparkle {
    z-index: 1;
    color: #fff;
    text-shadow: 0 1px 8px rgba(154, 120, 199, .25);
}

#oshiDetailPage .sparkle-one {
    top: 12%;
    left: -9px;
    font-size: 27px;
}

#oshiDetailPage .sparkle-two {
    right: -10px;
    bottom: 24%;
    font-size: 25px;
}

#oshiDetailPage .sparkle-three {
    right: 8px;
    top: 6%;
    font-size: 21px;
}

#oshiDetailPage .oshi-home-hero-caption {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 20px;
    color: #8d7bad;
    font-size: 11px;
    text-align: center;
}

#oshiDetailPage .oshi-home-caption-line {
    width: 22px;
    height: 1px;
    background: rgba(157, 132, 191, .4);
}

/* -------------------------
   共通セクション
------------------------- */

#oshiDetailPage .oshi-profile-card,
#oshiDetailPage .oshi-home-content-section {
    margin-top: 20px;
    padding: 19px 16px;
    border: 1px solid rgba(232, 220, 246, .9);
    border-radius: 23px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 5px 18px rgba(156, 129, 190, .07);
}

#oshiDetailPage .oshi-home-section-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    margin-bottom: 17px;
}

#oshiDetailPage .oshi-home-section-icon {
    display: flex;
    flex: 0 0 41px;
    align-items: center;
    justify-content: center;
    width: 41px;
    height: 41px;
    border: 1px solid #f0e4fb;
    border-radius: 15px;
    background: linear-gradient(145deg, #f7eaff, #e9f4ff);
    font-size: 19px;
}

#oshiDetailPage .oshi-home-section-heading > div {
    flex: 1;
    min-width: 0;
}

#oshiDetailPage .oshi-home-section-en {
    margin: 0 0 3px;
    color: #b29acb;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

#oshiDetailPage .oshi-home-section-heading h2 {
    margin: 0;
    color: #786392;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
}

#oshiDetailPage .oshi-home-heading-decoration {
    color: #d4a9d8;
    font-size: 22px;
}

#oshiDetailPage .oshi-home-section-description {
    margin: -5px 0 15px;
    color: var(--oshi-muted);
    font-size: 12px;
    line-height: 1.8;
}

/* -------------------------
   メッセージカード
------------------------- */

#oshiDetailPage .oshi-home-message-card {
    position: relative;
    margin-bottom: 16px;
    padding: 19px 18px 17px;
    border: 1px solid #f1e3f7;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff5fc, #f5f6ff 60%, #eff9ff);
}

#oshiDetailPage .oshi-home-message-mark {
    display: block;
    height: 20px;
    color: #d5b2e4;
    font-family: Georgia, serif;
    font-size: 37px;
    line-height: 1;
}

#oshiDetailPage .oshi-home-message-card p {
    margin: 6px 0;
    color: #837194;
    font-size: 13px;
    line-height: 2;
    white-space: pre-line;
}

#oshiDetailPage .oshi-home-message-heart {
    display: block;
    color: #dfaed4;
    font-size: 17px;
    text-align: right;
}

/* -------------------------
   プロフィール情報
------------------------- */

#oshiDetailPage .oshi-home-profile-details {
    display: flex;
    flex-direction: column;
}

#oshiDetailPage .oshi-home-profile-row {
    display: grid;
    grid-template-columns: minmax(95px, .75fr) minmax(0, 1.5fr);
    gap: 10px;
    padding: 12px 2px;
    border-bottom: 1px dashed #eee5f5;
    font-size: 12px;
    line-height: 1.7;
}

#oshiDetailPage .oshi-home-profile-row:last-child {
    border-bottom: 0;
}

#oshiDetailPage .oshi-home-profile-label {
    color: #a493b6;
}

#oshiDetailPage .oshi-home-profile-value {
    color: #726086;
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
}

#oshiDetailPage .oshi-home-profile-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #faf5ff;
    color: #9b8aaf;
}

#oshiDetailPage .oshi-home-profile-note > span {
    color: #d7a7d5;
}

#oshiDetailPage .oshi-home-profile-note p {
    margin: 0;
    font-size: 11px;
    line-height: 1.8;
}

/* -------------------------
   ページ内ナビゲーション
------------------------- */

#oshiDetailPage .oshi-home-section-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-top: 17px;
    padding: 10px;
    border: 1px solid #eee4f7;
    border-radius: 20px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 4px 15px rgba(156, 129, 190, .06);
}

#oshiDetailPage .oshi-home-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    min-height: 65px;
    padding: 8px 2px;
    border-radius: 14px;
    color: #86729f;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

#oshiDetailPage .oshi-home-nav-item:nth-child(1) {
    background: #f5efff;
}

#oshiDetailPage .oshi-home-nav-item:nth-child(2) {
    background: #fff0f8;
}

#oshiDetailPage .oshi-home-nav-item:nth-child(3) {
    background: #eef7ff;
}

#oshiDetailPage .oshi-home-nav-item:nth-child(4) {
    background: #f5f3ff;
}

#oshiDetailPage .oshi-home-nav-icon {
    font-size: 20px;
}

/* -------------------------
   スケジュールカード
------------------------- */

#oshiDetailPage .oshi-home-feature-card {
    padding: 17px;
    border: 1px solid #e7ddfa;
    border-radius: 19px;
    background: linear-gradient(135deg, #f4edff, #eef7ff);
}

#oshiDetailPage .oshi-home-feature-card-top {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
}

#oshiDetailPage .oshi-home-feature-icon {
    font-size: 23px;
}

#oshiDetailPage .oshi-home-feature-label {
    color: #a28dc4;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

#oshiDetailPage .oshi-home-feature-card h3 {
    margin: 0 0 8px;
    color: #796493;
    font-size: 15px;
    line-height: 1.7;
}

#oshiDetailPage .oshi-home-feature-card p {
    margin: 0 0 15px;
    color: #9383a8;
    font-size: 12px;
    line-height: 1.9;
}

#oshiDetailPage .oshi-home-outline-button,
#oshiDetailPage .oshi-home-primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 10px 15px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

#oshiDetailPage .oshi-home-outline-button {
    border: 1px solid #ddcef2;
    background: rgba(255,255,255,.86);
    color: #826bad;
}

#oshiDetailPage .oshi-home-primary-button {
    border: 1px solid transparent;
    background: linear-gradient(100deg, #c5a9ed, #b5cafa, #e9bce0);
    color: #fff;
    box-shadow: 0 4px 12px rgba(167, 140, 207, .16);
}

#oshiDetailPage .oshi-home-outline-button span {
    font-size: 18px;
}

#oshiDetailPage .oshi-home-mini-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 13px;
    color: #a396b5;
    font-size: 11px;
    line-height: 1.8;
}

/* -------------------------
   ギャラリー
------------------------- */

#oshiDetailPage .oshi-home-gallery-section {
    background:
        radial-gradient(ellipse at 100% 0%, rgba(228, 239, 255, .4), transparent 35%),
        rgba(255, 255, 255, .92);
}

#oshiDetailPage .oshi-home-gallery-actions {
    display: grid;
    
    gap: 9px;
    margin-top: 13px;
}

/* 前回追加したギャラリーCSSを活かしつつ、ページの色に合わせる */
#oshiDetailPage .oshi-home-gallery-empty {
    border-color: #e4d5f3;
    background: linear-gradient(135deg, #fcf5ff, #f0f7ff);
}

#oshiDetailPage .oshi-home-gallery-photo {
    border-color: #fff;
    box-shadow: 0 3px 12px rgba(139, 115, 174, .13);
}

/* -------------------------
   記録カード
------------------------- */

#oshiDetailPage .oshi-home-record-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin-top: 10px;
    padding: 14px;
    border: 1px solid #eee2f7;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7fc, #f5f5ff);
}

#oshiDetailPage .oshi-home-record-card-secondary {
    background: linear-gradient(135deg, #f2f8ff, #f9f4ff);
}

#oshiDetailPage .oshi-home-record-icon {
    display: flex;
    flex: 0 0 43px;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    border-radius: 15px;
    background: rgba(255,255,255,.8);
    font-size: 21px;
}

#oshiDetailPage .oshi-home-record-text {
    flex: 1;
    min-width: 0;
}

#oshiDetailPage .oshi-home-record-text h3 {
    margin: 0 0 5px;
    color: #7d6995;
    font-size: 12px;
    line-height: 1.7;
}

#oshiDetailPage .oshi-home-record-text p {
    margin: 0;
    color: #9b8eaa;
    font-size: 11px;
    line-height: 1.8;
}

#oshiDetailPage .oshi-home-record-button {
    display: flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #e7d9f2;
    border-radius: 11px;
    background: #fff;
    color: #9a81bc;
    font-size: 20px;
    cursor: pointer;
}

#oshiDetailPage .oshi-home-record-heart {
    color: #d6a8d5;
    font-size: 21px;
}

/* -------------------------
   リンク
------------------------- */

#oshiDetailPage .oshi-home-links-card {
    padding: 15px;
    border: 1px solid #eae0f5;
    border-radius: 18px;
    background: linear-gradient(135deg, #f9f4ff, #f1f8ff);
}

#oshiDetailPage .oshi-home-links-card > p {
    margin: 0 0 12px;
    color: #9282a7;
    font-size: 12px;
    line-height: 1.8;
}

#oshiDetailPage .oshi-home-links-empty {
    display: block;
    padding: 13px;
    border-radius: 13px;
    background: rgba(255,255,255,.7);
    color: #a092b2;
    font-size: 11px;
    line-height: 1.8;
}

/* -------------------------
   フッター
------------------------- */

#oshiDetailPage .oshi-home-footer {
    padding: 27px 8px 12px;
    color: #a395b8;
    text-align: center;
}

#oshiDetailPage .oshi-home-footer-stars {
    margin-bottom: 9px;
    color: #c5a7df;
    font-size: 16px;
    letter-spacing: 3px;
}

#oshiDetailPage .oshi-home-footer p {
    margin: 0 0 7px;
    font-family: Georgia, serif;
    font-size: 11px;
    letter-spacing: .3px;
}

#oshiDetailPage .oshi-home-footer > span {
    font-size: 10px;
}

/* -------------------------
   写真追加モーダル
------------------------- */

#oshiDetailPage #oshiPhotoAddModal {
    position: fixed;
    z-index: 10000;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

#oshiDetailPage #oshiPhotoAddModal[style*="display: flex"] {
    display: flex !important;
}

#oshiDetailPage .oshi-photo-add-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(62, 47, 84, .45);
    backdrop-filter: blur(5px);
}

#oshiDetailPage .oshi-photo-add-modal-content {
    position: relative;
    z-index: 1;
    width: min(100%, 390px);
    padding: 24px 18px 20px;
    border: 1px solid #fff;
    border-radius: 25px;
    background: linear-gradient(145deg, #fffaff, #f4f3ff);
    box-shadow: 0 15px 50px rgba(61, 42, 85, .2);
}

#oshiDetailPage .oshi-photo-add-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 1px solid #eee2f6;
    border-radius: 12px;
    background: #fff;
    color: #8d78a9;
    font-size: 22px;
    cursor: pointer;
}

#oshiDetailPage .oshi-photo-add-modal-heading {
    margin-bottom: 20px;
    text-align: center;
}

#oshiDetailPage .oshi-photo-add-modal-heading > span {
    color: #d5a9d8;
    font-size: 28px;
}

#oshiDetailPage .oshi-photo-add-modal-heading h2 {
    margin: 8px 0 5px;
    color: #786392;
    font-size: 19px;
}

#oshiDetailPage .oshi-photo-add-modal-heading p {
    margin: 0;
    color: #a294b2;
    font-size: 11px;
}

#oshiDetailPage .oshi-photo-add-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 68px;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #eadff6;
    border-radius: 17px;
    background: #fff;
    color: #85709f;
    text-align: left;
    cursor: pointer;
}

#oshiDetailPage .oshi-photo-add-option > span:first-child {
    font-size: 25px;
}

#oshiDetailPage .oshi-photo-add-option > span:nth-child(2) {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

#oshiDetailPage .oshi-photo-add-option strong {
    font-size: 13px;
}

#oshiDetailPage .oshi-photo-add-option small {
    color: #a496b3;
    font-size: 10px;
}

#oshiDetailPage .oshi-photo-add-option-arrow {
    font-size: 22px;
}

/* -------------------------
   写真アルバム・写真ビューア
   既存機能を壊さないための基本レイアウト
------------------------- */

#oshiDetailPage #oshiPhotoAlbumViewer,
#oshiDetailPage #oshiPhotoViewer {
    position: fixed;
    z-index: 10001;
    inset: 0;
    overflow: auto;
    background: #fcf9ff;
}

#oshiDetailPage #oshiPhotoAlbumViewer {
    padding: 16px;
}

#oshiDetailPage #oshiPhotoViewer {
    display: flex;
    flex-direction: column;
    background: #17131f;
    color: #fff;
}

#oshiDetailPage .oshi-photo-album-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 55px;
}

#oshiDetailPage .oshi-photo-album-header > button,
#oshiDetailPage #oshiPhotoViewerCloseButton {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border: 1px solid #eadff6;
    border-radius: 13px;
    background: #fff;
    color: #826ba2;
    font-size: 23px;
    cursor: pointer;
}

#oshiDetailPage .oshi-photo-album-header-title {
    flex: 1;
    min-width: 0;
}

#oshiDetailPage .oshi-photo-album-header-title h2 {
    margin: 0 0 3px;
    color: #7d6799;
    font-size: 16px;
}

#oshiDetailPage .oshi-photo-album-header-title span {
    color: #a294b2;
    font-size: 10px;
}

#oshiDetailPage #oshiPhotoAlbumSelectedCount {
    color: #8d77ad;
    font-size: 12px;
}

#oshiDetailPage .oshi-photo-album-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

#oshiDetailPage .oshi-photo-album-toolbar button {
    flex: 1;
    min-width: 75px;
    min-height: 40px;
    padding: 8px;
    border: 1px solid #e7dcf3;
    border-radius: 13px;
    background: #fff;
    color: #826c9f;
    font-size: 12px;
    cursor: pointer;
}

#oshiDetailPage #oshiPhotoAlbumViewerGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

#oshiDetailPage #oshiPhotoAlbumViewerGrid img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
}

#oshiDetailPage .oshi-photo-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
}

#oshiDetailPage #oshiPhotoViewerTopButton {
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 13px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

#oshiDetailPage .oshi-photo-viewer-stage {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 10px;
    overflow: hidden;
}

#oshiDetailPage #oshiPhotoViewerImage {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
}

#oshiDetailPage .oshi-photo-viewer-toolbar {
    display: flex;
    justify-content: center;
    gap: 13px;
    padding: 14px 12px max(18px, env(safe-area-inset-bottom));
}

#oshiDetailPage .oshi-photo-viewer-toolbar button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 16px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 19px;
    cursor: pointer;
}

/* -------------------------
   スマートフォン
------------------------- */

@media (max-width: 420px) {
    #oshiDetailPage.oshi-home-page {
        padding-right: 11px;
        padding-left: 11px;
    }

    #oshiDetailPage .oshi-home-hero {
        padding: 22px 12px 18px;
        border-radius: 23px;
    }

    #oshiDetailPage .oshi-home-main-photo-wrap {
        width: min(100%, 285px);
    }

    #oshiDetailPage .oshi-profile-card,
    #oshiDetailPage .oshi-home-content-section {
        padding: 16px 13px;
        border-radius: 20px;
    }

    #oshiDetailPage .oshi-home-profile-row {
        grid-template-columns: minmax(86px, .8fr) minmax(0, 1.4fr);
        font-size: 11px;
    }

    #oshiDetailPage .oshi-home-section-nav {
        gap: 4px;
        padding: 7px;
    }

    #oshiDetailPage .oshi-home-nav-item {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    #oshiDetailPage .oshi-home-nav-item,
    #oshiDetailPage .oshi-home-outline-button,
    #oshiDetailPage .oshi-home-primary-button,
    #oshiDetailPage .oshi-home-gallery-photo {
        transition: transform .16s ease, box-shadow .16s ease;
    }

    #oshiDetailPage .oshi-home-nav-item:active,
    #oshiDetailPage .oshi-home-outline-button:active,
    #oshiDetailPage .oshi-home-primary-button:active,
    #oshiDetailPage .oshi-home-gallery-photo:active {
        transform: scale(.98);
    }
}










/* =========================================================
   推し詳細ページ・写真専用CSS
   oshi-details-photo.css

   ・メイン写真
   ・ギャラリープレビュー
   ・写真追加モーダル
   ・写真アルバム
   ・星空演出
   ・写真ビューワ
   ・既存サムネイル表示

   ※写真データやイベント処理は変更しない
========================================================= */


/* =========================================================
   📸 メイン写真
========================================================= */

#oshiDetailPage .oshi-home-main-photo-wrap {
    position: relative;
    width: min(100%, 320px);
    margin: 0 auto;
}

#oshiDetailPage .oshi-main-photo-placeholder,
#oshiDetailPage .oshi-home-main-photo-button {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 0;
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, .9);
    border-radius: 25px;
    background: linear-gradient(145deg, #dcd2f4, #d8eafa, #f8dced);
    box-shadow: 0 9px 25px rgba(113, 89, 157, .2);
}

#oshiDetailPage .oshi-main-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
    color: #79649e;
    font-size: 13px;
    cursor: pointer;
}

#oshiDetailPage .oshi-main-photo-placeholder .oshi-home-photo-placeholder-icon {
    font-size: 45px;
}

#oshiDetailPage .oshi-main-photo-placeholder small {
    color: #9381ad;
    font-size: 11px;
}

#oshiDetailPage .oshi-home-main-photo-button {
    position: relative;
    cursor: pointer;
}

#oshiDetailPage .oshi-home-main-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#oshiDetailPage .oshi-home-main-photo-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 30px;
    background: rgba(255, 255, 255, .86);
    color: #896eb1;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .6px;
}


/* =========================================================
   📸 ギャラリープレビュー
========================================================= */

#oshiDetailPage .oshi-home-gallery-preview {
    width: 100%;
    min-width: 0;
    margin: 16px 0;
}

#oshiDetailPage .oshi-home-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

#oshiDetailPage .oshi-home-gallery-photo {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, #f2eaff, #e4f4ff);
    box-shadow: 0 3px 12px rgba(139, 115, 174, .13);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#oshiDetailPage .oshi-home-gallery-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#oshiDetailPage .oshi-home-gallery-view-all {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    padding: 10px 14px;
    border: 1px solid #dfd1f5;
    border-radius: 14px;
    background: #fffaff;
    color: #8065ad;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#oshiDetailPage .oshi-home-gallery-empty {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px 12px;
    border: 1px dashed #e4d5f3;
    border-radius: 18px;
    background: linear-gradient(135deg, #fcf5ff, #f0f7ff);
    color: #8c7aa8;
    text-align: center;
}

#oshiDetailPage .oshi-home-gallery-empty > span {
    color: #c4a5e8;
    font-size: 30px;
    line-height: 1;
}

#oshiDetailPage .oshi-home-gallery-empty p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

#oshiDetailPage .oshi-home-gallery-empty small {
    color: #a397b6;
    font-size: 12px;
}


/* =========================================================
   📸 写真追加モーダル
========================================================= */

#oshiDetailPage #oshiPhotoAddModal {
    position: fixed;
    z-index: 10010;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

#oshiDetailPage #oshiPhotoAddModal[style*="display: flex"] {
    display: flex !important;
}

#oshiDetailPage .oshi-photo-add-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(62, 47, 84, .45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#oshiDetailPage .oshi-photo-add-modal-content {
    position: relative;
    z-index: 1;
    width: min(100%, 390px);
    max-height: calc(100% - 24px);
    overflow-y: auto;
    padding: 24px 18px 20px;
    border: 1px solid #fff;
    border-radius: 25px;
    background: linear-gradient(145deg, #fffaff, #f4f3ff);
    box-shadow: 0 15px 50px rgba(61, 42, 85, .2);
}

#oshiDetailPage .oshi-photo-add-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 1px solid #eee2f6;
    border-radius: 12px;
    background: #fff;
    color: #8d78a9;
    font-size: 22px;
    cursor: pointer;
}

#oshiDetailPage .oshi-photo-add-modal-heading {
    margin-bottom: 20px;
    text-align: center;
}

#oshiDetailPage .oshi-photo-add-modal-heading > span {
    color: #d5a9d8;
    font-size: 28px;
}

#oshiDetailPage .oshi-photo-add-modal-heading h2 {
    margin: 8px 0 5px;
    color: #786392;
    font-size: 19px;
}

#oshiDetailPage .oshi-photo-add-modal-heading p {
    margin: 0;
    color: #a294b2;
    font-size: 11px;
}

#oshiDetailPage .oshi-photo-add-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 68px;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #eadff6;
    border-radius: 17px;
    background: #fff;
    color: #85709f;
    text-align: left;
    cursor: pointer;
}

#oshiDetailPage .oshi-photo-add-option > span:first-child {
    flex: 0 0 auto;
    font-size: 25px;
}

#oshiDetailPage .oshi-photo-add-option > span:nth-child(2) {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

#oshiDetailPage .oshi-photo-add-option strong {
    font-size: 13px;
}

#oshiDetailPage .oshi-photo-add-option small {
    color: #a496b3;
    font-size: 10px;
}

#oshiDetailPage .oshi-photo-add-option-arrow {
    flex: 0 0 auto;
    font-size: 22px;
}


/* =========================================================
   🌌 写真アルバム
========================================================= */

#oshiDetailPage #oshiPhotoAlbumViewer {
    position: fixed;
    z-index: 10001;
    inset: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 16px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
        radial-gradient(ellipse at 15% 10%, rgba(120, 91, 180, .24), transparent 38%),
        radial-gradient(ellipse at 85% 70%, rgba(89, 115, 183, .20), transparent 40%),
        linear-gradient(160deg, #171327, #211b38 55%, #151a30);
    color: #fff;
    -webkit-overflow-scrolling: touch;
}

#oshiDetailPage .oshi-photo-album-stars {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

#oshiDetailPage .oshi-photo-album-star {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 0 4px rgba(255, 255, 255, var(--star-glow, .5)),
        0 0 9px rgba(199, 190, 255, calc(var(--star-glow, .5) * .7));
    animation: oshiPhotoAlbumStarTwinkle var(--star-duration, 4s) ease-in-out var(--star-delay, 0s) infinite alternate;
}

@keyframes oshiPhotoAlbumStarTwinkle {
    0% {
        opacity: .25;
        transform: scale(.8);
    }

    100% {
        opacity: 1;
        transform: scale(1.35);
    }
}

#oshiDetailPage .oshi-photo-album-header,
#oshiDetailPage .oshi-photo-album-toolbar,
#oshiDetailPage #oshiPhotoAlbumViewerGrid,
#oshiDetailPage #oshiPhotoAlbumSelectedCount {
    position: relative;
    z-index: 1;
}

#oshiDetailPage .oshi-photo-album-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 55px;
}

#oshiDetailPage .oshi-photo-album-header > button {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 13px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 23px;
    cursor: pointer;
}

#oshiDetailPage .oshi-photo-album-header-title {
    flex: 1;
    min-width: 0;
}

#oshiDetailPage .oshi-photo-album-header-title h2 {
    margin: 0 0 3px;
    color: #fff;
    font-size: 16px;
}

#oshiDetailPage .oshi-photo-album-header-title span {
    color: rgba(255, 255, 255, .65);
    font-size: 10px;
}

#oshiDetailPage #oshiPhotoAlbumSelectedCount {
    min-width: 0;
    color: #e6d8ff;
    font-size: 12px;
    overflow-wrap: anywhere;
}

#oshiDetailPage .oshi-photo-album-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

#oshiDetailPage .oshi-photo-album-toolbar button {
    flex: 1 1 75px;
    min-width: 0;
    min-height: 40px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 13px;
    background: rgba(255, 255, 255, .11);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

#oshiDetailPage #oshiPhotoAlbumViewerGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

#oshiDetailPage .oshi-photo-album-viewer-item {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#oshiDetailPage .oshi-photo-album-viewer-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

#oshiDetailPage .oshi-photo-album-viewer-item.selected {
    border-color: #e6c8ff;
    box-shadow: 0 0 0 2px rgba(206, 170, 255, .65);
}

#oshiDetailPage .oshi-photo-album-viewer-status {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
}

#oshiDetailPage .oshi-photo-album-viewer-status span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    min-height: 26px;
    padding: 4px;
    border-radius: 8px;
    background: rgba(16, 12, 27, .72);
}

#oshiDetailPage .oshi-photo-album-viewer-status .top-icon {
    color: #ff4d6d;
}


#oshiDetailPage #oshiPhotoAlbumViewer.selection-mode .oshi-photo-album-viewer-item {
    border-color: rgba(231, 208, 255, .55);
}

#oshiDetailPage #oshiPhotoAlbumViewer.selection-mode .oshi-photo-album-viewer-item.selected {
    border-color: #f6d5ff;
    box-shadow: 0 0 0 3px rgba(224, 185, 255, .75);
}


/* =========================================================
   🖼️ 写真ビューワ
========================================================= */

#oshiDetailPage #oshiPhotoViewer {
    position: fixed;
    z-index: 10002;
    inset: 0;
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    background: #17131f;
    color: #fff;
    overscroll-behavior: contain;
}

#oshiDetailPage .oshi-photo-viewer-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    padding-top: max(14px, env(safe-area-inset-top));
}

#oshiDetailPage #oshiPhotoViewerTopButton,
#oshiDetailPage #oshiPhotoViewerCloseButton {
    flex: 0 0 auto;
    min-width: 40px;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 13px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}


#oshiDetailPage #oshiPhotoViewerCloseButton {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    position: relative;
    z-index: 10;
    color: #fff;
    background: #383044;
    font-size: 24px;
}

#oshiDetailPage #oshiPhotoViewerTopButton.active {
    border-color: rgba(255, 180, 220, .7);
    background: rgba(224, 130, 185, .25);
    color: #ffc5e2;
}

#oshiDetailPage .oshi-photo-viewer-stage {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 10px;
    overflow: hidden;
    touch-action: none;
}

#oshiDetailPage #oshiPhotoViewerImage {
    display: block;
    flex: 0 0 auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}

#oshiDetailPage .oshi-photo-viewer-toolbar {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 13px;
    padding: 14px 12px max(18px, env(safe-area-inset-bottom));
    background: #17131f;
}

#oshiDetailPage .oshi-photo-viewer-toolbar button {
    display: flex;
    flex: 0 0 45px;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 16px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 19px;
    cursor: pointer;
}


/* =========================================================
   📸 既存サムネイルHTML用
   別画面から呼び出される可能性があるため維持
========================================================= */

#oshiDetailPage .oshi-photo-thumbnail {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #f0eafa;
}

#oshiDetailPage .oshi-photo-thumbnail-button {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    cursor: pointer;
}

#oshiDetailPage .oshi-photo-thumbnail-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

#oshiDetailPage .oshi-photo-status {
    position: absolute;
    top: 5px;
    right: 5px;
    left: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    pointer-events: none;
}

#oshiDetailPage .oshi-photo-status-favorite,
#oshiDetailPage .oshi-photo-status-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    min-height: 23px;
    padding: 3px;
    border-radius: 8px;
    background: rgba(20, 16, 30, .6);
    color: #fff;
    font-size: 12px;
}

#oshiDetailPage .oshi-photo-favorite-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 3px;
    border: 0;
    border-radius: 9px;
    background: rgba(20, 16, 30, .6);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    pointer-events: auto;
}


/* =========================================================
   📱 スマートフォン対応
========================================================= */

@media (max-width: 420px) {
    #oshiDetailPage .oshi-home-main-photo-wrap {
        width: min(100%, 285px);
    }

    #oshiDetailPage .oshi-home-gallery-grid {
        gap: 6px;
    }

    #oshiDetailPage .oshi-home-gallery-photo {
        border-radius: 10px;
    }

    #oshiDetailPage #oshiPhotoAlbumViewer {
        padding: 12px;
    }

    #oshiDetailPage #oshiPhotoAlbumViewerGrid {
        gap: 6px;
    }

    #oshiDetailPage .oshi-photo-album-header {
        gap: 8px;
    }

    #oshiDetailPage .oshi-photo-album-header > button {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    #oshiDetailPage #oshiPhotoAlbumSelectedCount {
        font-size: 11px;
    }

    #oshiDetailPage .oshi-photo-viewer-header {
        gap: 8px;
        padding-right: 10px;
        padding-left: 10px;
    }

    #oshiDetailPage .oshi-photo-viewer-toolbar {
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #oshiDetailPage .oshi-photo-album-star {
        animation: none;
    }
}



/* =====================================================
   💗 プロフィール編集画面
   ・入力欄を見やすくする
   ・保存 / キャンセルボタンを整える
   ・スマートフォンでも横にはみ出さない
===================================================== */

#oshiDetailPage .oshi-profile-edit-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin-top: 18px;
}

#oshiDetailPage .oshi-profile-edit-field label {
    color: #8067a5;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
}

#oshiDetailPage .oshi-profile-edit-field input,
#oshiDetailPage .oshi-profile-edit-field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e4d7f2;
    border-radius: 13px;
    outline: none;
    background: #fffaff;
    color: #66567f;
    font: inherit;
    font-size: 14px;
    line-height: 1.7;
    box-shadow: inset 0 1px 3px rgba(133, 113, 180, .05);
}

#oshiDetailPage .oshi-profile-edit-field textarea {
    min-height: 110px;
    resize: vertical;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

#oshiDetailPage .oshi-profile-edit-field input:focus,
#oshiDetailPage .oshi-profile-edit-field textarea:focus {
    border-color: #b9a1df;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(185, 161, 223, .16);
}

#oshiDetailPage .oshi-profile-edit-field input[type="date"] {
    min-height: 46px;
    color-scheme: light;
}

#oshiDetailPage .oshi-profile-edit-field input::placeholder,
#oshiDetailPage .oshi-profile-edit-field textarea::placeholder {
    color: #b4a7c3;
    opacity: 1;
}

#oshiDetailPage .oshi-activity-edit-media-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin-top: 24px;
}

#oshiDetailPage .oshi-profile-edit-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 46px;
    padding: 10px 8px;
    border: 1px solid #e2d4f2;
    border-radius: 14px;
    background: #fff;
    color: #8067a5;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#oshiDetailPage .oshi-profile-edit-actions button:first-child {
    border-color: transparent;
    background: linear-gradient(
        110deg,
        #c5a9ed,
        #b5cafa,
        #e9bce0
    );
    color: #fff;
    box-shadow: 0 4px 12px rgba(167, 140, 207, .16);
}

#oshiDetailPage .oshi-profile-edit-actions button:active,
#oshiDetailPage .oshi-profile-edit-button:active {
    transform: scale(.98);
}

#oshiDetailPage .oshi-profile-edit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    margin-top: 18px;
    padding: 11px 14px;
    border: 1px solid #e4d7f2;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbf5ff, #f1f7ff);
    color: #8067a5;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#oshiDetailPage #oshiProfileEditor[hidden],
#oshiDetailPage #oshiProfileView[hidden] {
    display: none !important;
}

@media (max-width: 360px) {
    #oshiDetailPage .oshi-profile-edit-actions {
        gap: 7px;
    }

    #oshiDetailPage .oshi-profile-edit-actions button {
        font-size: 12px;
    }
}


/* =====================================================
   💗 プロフィール通常表示のデザイン調整
   ・項目名と日付を見やすくする
   ・日付欄をふんわりパステル調にする
   ・スマートフォンの表示崩れを防ぐ
===================================================== */

#oshiDetailPage .oshi-home-profile-details {
    gap: 7px;
}

#oshiDetailPage .oshi-home-profile-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 13px 12px;
    border: 1px solid #f0e7f8;
    border-radius: 14px;
    background: linear-gradient(
        110deg,
        #fffaff,
        #f8f7ff 60%,
        #f4faff
    );
    font-size: 12px;
    line-height: 1.8;
}

#oshiDetailPage .oshi-home-profile-label {
    min-width: 0;
    color: #927da9;
    font-weight: 600;
    overflow-wrap: anywhere;
}

#oshiDetailPage .oshi-home-profile-value {
    min-width: 0;
    color: #725b91;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.9;
    text-align: right;
    overflow-wrap: anywhere;
    word-break: normal;
}

#oshiDetailPage .oshi-home-profile-row:has(
    #oshiHomeBirthday,
    #oshiHomeStartDate,
    #oshiHomeFormationDate
) .oshi-home-profile-value {
    color: #8067a5;
}

#oshiDetailPage .oshi-home-profile-note {
    margin-top: 15px;
    border: 1px solid #f0e5f8;
    background: linear-gradient(135deg, #fff5fc, #f3f7ff);
}

@media (max-width: 360px) {
    #oshiDetailPage .oshi-home-profile-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
        gap: 7px;
        padding: 11px 9px;
        font-size: 11px;
    }

    #oshiDetailPage .oshi-home-profile-value {
        font-size: 11px;
    }
}



/* =====================================================
   💗 好きなところ・メッセージ
   ・ふんわりパステル調
   ・文章を読みやすく表示
   ・長い文章もスマホ内に収める
===================================================== */

#oshiDetailPage .oshi-home-profile-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 15px;
    border: 1px solid #f0e4fa;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        #fff4fb,
        #f8f4ff 55%,
        #f0f8ff
    );
    color: #806b98;
    line-height: 1.9;
    overflow-wrap: anywhere;
    box-shadow: 0 3px 10px rgba(180, 150, 210, 0.08);
}

#oshiDetailPage .oshi-home-profile-note * {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

#oshiDetailPage #oshiHomeMessage {
    color: #806b98;
    font-size: 13px;
    line-height: 2;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
}




/* =====================================================
   🔗 推し公式リンク・SNS
===================================================== */

.oshi-home-links-editor {
    margin-top: 18px;
}

.oshi-home-links-editor-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--text-color, #75566f);
}

.oshi-home-link-edit-item {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(190, 150, 190, 0.3);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
}

.oshi-home-link-edit-item select,
.oshi-home-link-edit-item input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid rgba(180, 145, 180, 0.35);
    border-radius: 10px;
    background: #fff;
    color: #55445a;
    font-size: 14px;
}

.oshi-home-link-edit-item button {
    align-self: flex-end;
    padding: 7px 12px;
    border: none;
    border-radius: 9px;
    background: #fff0f2;
    color: #b65d78;
    cursor: pointer;
}

.oshi-home-links-add-button {
    width: 100%;
    padding: 12px;
    border: 1px dashed rgba(180, 130, 180, 0.55);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    color: #936b91;
    font-size: 14px;
    cursor: pointer;
}

.oshi-home-links-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.oshi-home-links-edit-actions button {
    flex: 1;
    min-width: 0;
    padding: 12px 8px;
    border: none;
    border-radius: 12px;
    background: #f4e5f1;
    color: #75566f;
    font-weight: 600;
    cursor: pointer;
}

.oshi-home-links-edit-actions button:first-child {
    background: #e9d5ed;
}





/* =====================================================
   🔗 推し公式リンク・SNS
   3列・正方形タイル
===================================================== */


/* リンク一覧 */

.oshi-home-sns-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 14px 10px;
    width: 100%;
    box-sizing: border-box;
}


/* リンクカード */

.oshi-home-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;

    width: calc((100% - 20px) / 3);
    max-width: 110px;
    min-width: 0;

    box-sizing: border-box;
}


/* =====================================================
   🔗 公式リンク・SNSタイル
===================================================== */

.oshi-home-link-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;

    width: 100%;
    aspect-ratio: 1 / 1;

    padding: 8px 4px;
    box-sizing: border-box;

    border: 1px solid rgba(190, 170, 220, 0.45);
    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            #f8f1ff 0%,
            #eef4ff 52%,
            #fff0f7 100%
        ) !important;

    box-shadow:
        0 4px 10px rgba(145, 125, 175, 0.12),
        inset 0 1px 3px rgba(255, 255, 255, 0.9);

    color: #8067a5 !important;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}


/* =====================================================
   🔘 リンクアイコン
===================================================== */

.oshi-home-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border-radius: 50%;

    color: #9276bd !important;

    background:
        linear-gradient(
            145deg,
            #e9dcff 0%,
            #dceaff 55%,
            #fce2f0 100%
        ) !important;

    font-size: 25px;
    font-weight: 700;
}


/* サービス名 */

.oshi-home-link-name {
    display: block;

    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #765b7b;
    font-size: 12px;
    font-weight: 600;
}


/* 公式・個人などの説明 */

.oshi-home-link-description {
    display: block;

    min-height: 17px;

    color: #a184a4;
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
}


/* タップ時 */

.oshi-home-link-button:active {
    transform: scale(0.95);

    box-shadow:
        0 2px 5px rgba(160, 120, 165, 0.12);
}


/* スマートフォン */

@media (max-width: 380px) {

    .oshi-home-sns-list {
        gap: 12px 7px;
    }

    .oshi-home-link-card {
        width: calc((100% - 14px) / 3);
    }

    .oshi-home-link-button {
        border-radius: 16px;
    }



    .oshi-home-link-name {
        font-size: 11px;
    }

}


/* =====================================================
   💜 ゆめかわSNSアイコンの色を強制指定
===================================================== */

#oshiHomeLinks .oshi-home-link-icon {
    color: #C49BCB !important;
    background: #FFFCFF !important;
}