/* =========================
   推し活記録ページ
   閉じるボタン
========================= */

.oshi-record-page-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
}

.oshi-record-close-btn {
    margin-left: auto;
}




/* =====================================================
   💖 推し活記録一覧
===================================================== */

#oshiContainer #oshiActivityList {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    padding-bottom: 24px;
}

/* 記録カード */

#oshiContainer .oshi-activity-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 20px;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 5px;

    width: 100%;
    min-width: 0;
    padding: 15px;

    text-align: left;
    font: inherit;
    color: inherit;

    background: var(--card-bg, #fff);
    border: 1px solid #f0dce7;
    border-radius: 16px;

    box-shadow: 0 3px 10px rgba(100, 50, 80, 0.06);

    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

/* 左側の種類アイコン */

#oshiContainer .oshi-activity-item::before {
    content: "💖";
    grid-column: 1;
    grid-row: 1 / 3;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    background: #fff0f6;
    border-radius: 14px;
    font-size: 23px;
}

/* タイトル */

#oshiContainer .oshi-activity-item strong {
    grid-column: 2;
    grid-row: 1;

    display: block;
    min-width: 0;

    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;

    overflow-wrap: anywhere;
}

/* 日付 */

#oshiContainer .oshi-activity-item .oshi-activity-date {
    grid-column: 2;
    grid-row: 2;

    font-size: 12px;
    color: #bd5b8a;
}

/* 補足情報 */

#oshiContainer .oshi-activity-item .oshi-activity-summary {
    grid-column: 2;
    grid-row: 3;

    min-width: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #777;

    overflow-wrap: anywhere;
}

/* 右側の矢印 */

#oshiContainer .oshi-activity-item::after {
    content: "›";
    grid-column: 3;
    grid-row: 1 / 4;

    justify-self: center;
    font-size: 25px;
    color: #c58aa8;
}

/* タップ時 */

#oshiContainer .oshi-activity-item:active {
    transform: scale(0.985);
    box-shadow: 0 1px 5px rgba(100, 50, 80, 0.08);
}

/* 記録がない場合 */

#oshiContainer .oshi-activity-empty {
    padding: 28px 16px;
    text-align: center;
    white-space: pre-line;

    color: #927b89;
    background: #fff8fb;
    border: 1px dashed #e9c9da;
    border-radius: 16px;

    font-size: 14px;
    line-height: 1.9;
}





/* =====================================================
   💖 推し活記録カード・操作ボタン
===================================================== */

#oshiContainer .oshi-activity-card {
    display: flex;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border: 1px solid #f0dce7;
    border-radius: 16px;
    background: var(--card-bg, #fff);
    box-shadow: 0 3px 10px rgba(100, 50, 80, 0.06);
}

#oshiContainer .oshi-activity-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 5px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

#oshiContainer .oshi-activity-card-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #fff0f6;
    font-size: 23px;
}

#oshiContainer .oshi-activity-card-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#oshiContainer .oshi-activity-card-title {
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

#oshiContainer .oshi-activity-date {
    color: #bd5b8a;
    font-size: 12px;
}

#oshiContainer .oshi-activity-summary {
    color: #777;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

#oshiContainer .oshi-activity-card-arrow {
    align-self: center;
    color: #c58aa8;
    font-size: 25px;
}

#oshiContainer .oshi-activity-card-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    flex: 0 0 38px;
}

#oshiContainer .oshi-activity-action {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0dce7;
    border-radius: 10px;
    background: #fff8fb;
    font-size: 16px;
    cursor: pointer;
}

#oshiContainer .oshi-activity-delete {
    color: #b84b69;
    font-size: 18px;
}

/* =====================================================
   💖 活動の詳細画面
===================================================== */

#oshiContainer .oshi-activity-detail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(35, 20, 30, 0.48);
}

#oshiContainer .oshi-activity-detail-overlay.show {
    display: flex;
}

#oshiContainer .oshi-activity-detail-panel {
    width: min(100%, 520px);
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 20px;
    background: var(--card-bg, #fff);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

#oshiContainer .oshi-activity-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid #f0dce7;
}

#oshiContainer .oshi-activity-detail-header h3 {
    margin: 0;
    font-size: 18px;
    overflow-wrap: anywhere;
}

#oshiContainer .oshi-activity-detail-close {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #fff0f6;
    color: #a34472;
    font-size: 18px;
    cursor: pointer;
}

#oshiContainer .oshi-activity-detail-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

#oshiContainer .oshi-activity-detail-type {
    align-self: flex-start;
    padding: 5px 11px;
    border-radius: 999px;
    background: #fff0f6;
    color: #a34472;
    font-size: 12px;
}

#oshiContainer .oshi-activity-detail-row {
    padding-bottom: 12px;
    border-bottom: 1px solid #f5e9ef;
}

#oshiContainer .oshi-activity-detail-label {
    margin-bottom: 5px;
    color: #a17c90;
    font-size: 12px;
}

#oshiContainer .oshi-activity-detail-value {
    color: inherit;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}





/* =====================================================
   💖 推し活記録入力モーダル
   ・画面内に収める
   ・入力欄はモーダル内部でスクロール
===================================================== */

#oshiActivityModal {
    box-sizing: border-box;
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;

    align-items: center;
    justify-content: center;

    padding: 10px;
    overflow: hidden;
}

#oshiActivityModal.show {
    display: flex;
}

#oshiActivityModal .oshi-activity-modal {
    position: relative;
    top: auto;
    left: auto;
    transform: none;

    box-sizing: border-box;
    width: 100%;
    max-width: 500px;

    max-height: 70vh;
max-height: 70dvh;
    margin: 0 auto;

    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;

    border-radius: 18px;
}

#oshiActivityModal .oshi-activity-modal-header {
    position: sticky;
    top: 0;
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;

    box-sizing: border-box;
    width: 100%;
    padding: 10px;

    background: var(--card, #fff);
    border-bottom: 1px solid var(--border, #f0dce7);
}

#oshiActivityModal .oshi-activity-modal-header h2 {
    min-width: 0;
    margin: 0;
    font-size: 18px;
}

#oshiActivityModal .oshi-activity-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 5px;
}

#oshiActivityModal .oshi-activity-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 38px;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;

    border: 1px solid var(--border, #f0dce7);
    border-radius: 10px;
    background: var(--card, #fff);
    color: var(--text, #333);

    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#oshiActivityModal .oshi-activity-icon-btn:active {
    transform: scale(0.94);
}

#oshiActivityModal .oshi-activity-icon-btn[title="保存"] {
    background: #fff0f6;
}

#oshiActivityModal .oshi-activity-icon-btn.delete-btn {
    color: #b84b69;
    background: #fff4f5;
}

@media (max-width: 380px) {
    #oshiActivityModal {
        padding: 6px;
    }

    #oshiActivityModal .oshi-activity-modal {
        max-height: calc(100vh - 12px);
        max-height: calc(100dvh - 12px);
    }

    #oshiActivityModal .oshi-activity-modal-header {
        gap: 4px;
        padding: 8px;
    }

    #oshiActivityModal .oshi-activity-icon-btn {
        flex-basis: 34px;
        width: 34px;
        min-width: 34px;
        height: 34px;
        font-size: 18px;
    }
}


/* 推し活記録：入力モーダル内の写真の横はみ出し防止 */
#oshiActivityModal img,
#oshiActivityModal video {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}



/* 推し活記録・詳細画面の写真サイズ */
#oshiContainer .oshi-activity-detail-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

#oshiContainer .oshi-activity-detail-media-item {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

#oshiContainer .oshi-activity-detail-image,
#oshiContainer .oshi-activity-detail-video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    box-sizing: border-box;
}




/* =====================================================
   💖 推し活記録ヘッダー
===================================================== */

#oshiContainer .oshi-record-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

#oshiContainer .oshi-record-main-header h3 {
    min-width: 0;
    margin: 0;
}

#oshiContainer .oshi-record-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 6px;
}

#oshiContainer .oshi-record-header-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
    font-size: 22px;
}


/* =====================================================
   💖 推し活記録カード
===================================================== */

#oshiContainer .oshi-activity-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    min-width: 0;
    padding: 10px;
    box-sizing: border-box;
}

/* カード内の文字色を統一 */

#oshiContainer .oshi-activity-card,
#oshiContainer .oshi-activity-card * {
    color: #222 !important;
}

/* メイン情報 */

#oshiContainer .oshi-activity-main {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;

    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;

    gap: 0px;
    margin: 0;
    padding: 0 5px;

    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;

    line-height: normal;
    text-align: left;
    box-sizing: border-box;
}


/* アイコン */

#oshiContainer .oshi-activity-card-icon {
    flex: 0 0 46px;
}

/* 文字情報 */

#oshiContainer .oshi-activity-card-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#oshiContainer .oshi-activity-card-title {
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

#oshiContainer .oshi-activity-card-arrow {
    flex: 0 0 auto;
}

/* タグとボタンの段 */

#oshiContainer .oshi-activity-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

/* タグ */

#oshiContainer .oshi-activity-card-tags {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

#oshiContainer .oshi-activity-tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 8px;
    background: #fff0f6;
    font-size: 11px;
    overflow-wrap: anywhere;
}

/* 編集・削除ボタン */

#oshiContainer .oshi-activity-card-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
}

#oshiContainer .oshi-activity-action {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* =====================================================
   🔎 推し活記録・検索メニュー
===================================================== */

#oshiContainer .oshi-activity-filter-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
}

#oshiContainer .oshi-activity-filter-actions button {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 4px;
    white-space: nowrap;
    font-size: 12px;
}