/* ユーザー画面カスタムスタイル（Viteビルド不要・即時反映用） */

/* event/info 系ページ（#event-page）はテキスト選択・コピーを許可（_base.scss の body 全体 user-select:none を上書き） */
#event-page,
#event-page * {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
}

/* お問合せID 等、 サポート時にコピーされる前提のテキスト */
.contact-id,
.contact-id * {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
    cursor: text;
}

/* PC/SP で対応するヘッダー画像だけを表示する（ページ固有CSSが効かないイベントページ等のフォールバック） */
/* 基本: SP 画像のみ表示 */
.pc-mainimg {
    display: none;
}
.sp-mainimg {
    display: block;
    width: 100%;
}

/* PC幅以上: PC 画像のみ表示 */
@media (min-width: 768px) {
    .pc-mainimg {
        display: block;
        width: 100%;
        max-width: 1180px;
        margin: auto;
    }
    .sp-mainimg {
        display: none;
    }
}

/* BJ イベント: コインテーブルのコインアイコン */
.coin-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 4px;
}

/* チケットアイコン */
.ticket-icon {
    display: inline-block;
    width: 56px;
    height: auto;
    vertical-align: middle;
    margin-right: 4px;
}

/* BJ イベント: 全体を白ベース(0.8透過)・文字黒に */
#event-page {
    color: #000 !important;
    font-size: calc(1em + 1px);
}
#event-page [v-cloak] { display: none; }
#event-page .event-section {
    background: rgba(255, 179, 233, 0.85) !important;
    color: #000;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
/* グッズ交換セクション専用 modifier。
   にじGAME 環境でレンダリング直後にスクロール領域が固定化される事象の対策として、
   グッズ交換ビューだけ縦領域を確保し親iframeの高さ計算ズレを回避する。
   他のセクション (ランキング・履歴・コイン履歴等) は短い表示でも余白が出ないよう min-height を付けない。 */
#event-page .event-section.event-section-goods {
    min-height: 1000px;
}
/* にじGAME のみ: 親iframe の幅が固定で、グッズ交換セクションの中身が
   枠外へはみ出してしまうため、内容が枠幅(≒1000px)を超えたら
   セクション内で横スクロールに収める。 他PFは従来通り(スクロールなし)。
   目印クラス .nijiyome-scroll は info_129.blade.php で $is_nijiyome のときだけ付与。 */
#event-page .event-section.event-section-goods.nijiyome-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
#event-page .event-section p {
    color: #000 !important;
}

/* event 130 用セクション（min-height なし、 ピンクを薄めに）
   既存 .event-section（カジノ用、min-height: 1000px）と共存させるため、 別クラスとして定義。 */
#event-page .evt130-section {
    background: rgba(255, 220, 240, 0.75) !important;
    color: #000;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
#event-page .evt130-section p {
    color: #000 !important;
}
#event-page .evt130-section .event-h2 {
    color: #c2185b;
}

/* event 130 キャスト視点表示: 水色系背景に切り替え
   .event130-frame--cast を wrap に付けた範囲で、 ユーザーと共通の .evt130-section を青ベースに上書き。
   .evt130-section--cast-only (キャスト専用 partial) は対象外として デフォルトのピンク系を維持する */
#event-page .event130-frame--cast .evt130-section:not(.evt130-section--cast-only) {
    background: rgba(180, 220, 240, 0.75) !important;
}
#event-page .event130-frame--cast .evt130-section:not(.evt130-section--cast-only) .event-h2 {
    color: #1f6b87;
}

/* event 130: 薄いグレー (#888/#777) を 濃グレー (#444) に統一して ピンク/水色背景でも読めるように。
   (#aaa/#ccc は既存ルールで #000 化済み) */
#event-page .evt130-section [style*="color: #888"],
#event-page .evt130-section [style*="color:#888"],
#event-page .evt130-section [style*="color: #777"],
#event-page .evt130-section [style*="color:#777"] {
    color: #444 !important;
}

/* event 130 共通 「※」 備考スタイル — 全テキスト注釈はこの class を付けて統一 */
#event-page .event-note {
    font-size: 11px !important;
    color: #000 !important;
    line-height: 1.8 !important;
    margin-top: 6px;
}

/* ユーザートップ お知らせウィジェット (.frame / .information-list の SCSS デフォルトを上書き)
   白の角丸カードに統一。 SCSS を触らず ここで完結 */
.user-information-card {
    /* before-frame と同じ 8px 10px の外側 margin で 横の余白を揃える */
    margin: 8px 10px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: none !important;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.user-information-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border: none !important;
    background: transparent !important;
}
.user-information-card li {
    border: none !important;
    background: transparent !important;
    padding: 4px 0;
}
.user-information-card a {
    text-decoration: none;
    /* タイトルが長くても 1行に収めて末尾を ellipsis に。 NEW バッジ + タイトルを横並び固定 */
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
/* NEW バッジ (お知らせ系 共通) */
.badge-new {
    display: inline-block;
    background: #fd7cb6;
    color: #fff !important;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    margin-right: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
    font-weight: bold;
}
#event-page .event-h2 {
    color: #ff1493;
    font-size: 1.2em;
    margin-bottom: 10px;
}
#event-page .event-table {
    width: 100%;
    border-collapse: collapse;
}
#event-page .event-table th {
    color: #e91e63 !important;
    border-color: #ccc;
    padding: 8px;
    border-bottom: 1px solid #ccc;
    font-weight: bold;
    text-align: left;
}
#event-page .event-table td {
    color: #000 !important;
    border-color: #ccc;
    padding: 8px;
    border-bottom: 1px solid #ccc;
}
/* 上位ランク: 王冠アイコン */
#event-page .event-table .rank-row .rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
    white-space: nowrap;
    line-height: 1;
}
#event-page .event-table .rank-medal-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
#event-page .event-table .rank-row td {
    vertical-align: middle;
}
#event-page .event-table .rank-row td:first-child {
    white-space: nowrap;
    min-width: 72px;
    text-align: center;
}
#event-page .event-table .rank-row .rank-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 2em;
}
#event-page .event-table .rank-1 td {
    font-size: 1.25em;
    font-weight: bold;
    color: #111 !important;
}
#event-page .event-table .rank-2 td {
    font-size: 1.1em;
    font-weight: bold;
    color: #222 !important;
}
#event-page .event-table .rank-3 td {
    font-size: 1.05em;
    font-weight: bold;
    color: #333 !important;
}

/* ランキング: 自分の行ハイライト */
#event-page .event-table .rank-self td {
    color: #e91e63 !important;
    font-weight: bold;
}

/* コイン交換モーダル */
#event-page .coin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
#event-page .coin-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    min-width: 280px;
    max-width: 90vw;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #000;
    text-align: center;
}
#event-page .coin-modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #e91e63;
    margin-bottom: 14px;
}
#event-page .coin-modal-body {
    margin-bottom: 20px;
    line-height: 1.6;
}
#event-page .coin-modal-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 10px;
}
#event-page .coin-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
#event-page .coin-modal-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #e91e63;
}
#event-page .coin-modal-btn--primary {
    background: #e91e63;
    color: #fff;
}
#event-page .coin-modal-btn--cancel {
    background: #fff;
    color: #e91e63;
}
#event-page .coin-modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ランキングローディング */
.ranking-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: #000;
}
.ranking-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(233, 30, 99, 0.3);
    border-top-color: #e91e63;
    border-radius: 50%;
    animation: ranking-spin 0.8s linear infinite;
}
@keyframes ranking-spin {
    to { transform: rotate(360deg); }
}
/* グレー系(#aaa, #ccc) を黒に、黄/ゴールド系を濃いピンクに統一 */
#event-page [style*="color: #aaa"],
#event-page [style*="color:#aaa"],
#event-page [style*="color: #ccc"],
#event-page [style*="color:#ccc"] {
    color: #000 !important;
}
#event-page [style*="color: gold"],
#event-page [style*="color:gold"],
#event-page [style*="color: #ffcb6b"],
#event-page [style*="color:#ffcb6b"],
#event-page [style*="color: #fdff28"] {
    color: #d6006b !important;
}
/* 視認性の低い淡い見出し色を濃色に */
#event-page [style*="color: #ff9999"],
#event-page [style*="color:#ff9999"] {
    color: #c23030 !important;
}
#event-page [style*="color: #99ccff"],
#event-page [style*="color:#99ccff"] {
    color: #1f4fbf !important;
}

/* コメント欄のホバー展開を完全無効化 */
.person-block-l:hover {
    overflow: hidden !important;
    z-index: auto !important;
}

/* カレンダー: 年月選択バーの上に隙間 */
#calendar .head {
    margin-top: 10px;
}

/* キャスト向け報酬テーブル: 順位列のフォントを強調 */
.cast-reward-table td:first-child {
    font-size: calc(1em + 2px);
    font-weight: 600;
}

/* ポイント購入ボタン: PC版チャット内の位置調整 */
.chat .roomstatus .chat-buypoint-talk {
    margin-top: 2px;
}

/* モバイル: ポイント行を横幅いっぱいに広げる */
.chat .roomstatus .chatbg-roomstatus.dom-point {
    width: 100%;
}

/* モバイル: VLPt購入ボタンの行は固定高さを解除（ボタンがはみ出て下要素と重なるのを防ぐ） */
.chat .roomstatus:has(.chat-buypoint-talk-l) {
    height: auto;
    padding-bottom: 4px;
}

/* イベントランキング枠: サンプルボイスと揃えて薄ピンクに、外側の茶枠を撤去 */
.char-ranking .ttl-sky-light .inner {
    background: linear-gradient(to right, #fd7cb6, #f5a6c8) !important;
}
.char-ranking .box-fraborder-color-pink {
    border-color: #fd7cb6 !important;
}
/* ゲージ外側の黒枠/半透明黒背景を撤去 */
.box-intimacies .gauge-area,
.box-intimacies-pc .gauge-area,
.box-intimacies-sp .gauge-area {
    border: none !important;
    background: transparent !important;
}
/* ゲージ base の背景をグレーから薄灰に */
.box-intimacies .gauge-area .base,
.box-intimacies-pc .gauge-area .base,
.box-intimacies-sp .gauge-area .base {
    background-color: #eee !important;
}
/* 獲得Exp 行のフォントサイズ */
.char-ranking .box-fraborder-color-pink .point {
    font-size: 14px !important;
}
/* イベント限定親密度の横に表示する小さなイベント名 */
.char-ranking .ttl-sky-light .inner .event-title-sub {
    font-size: 11px;
    margin-left: 8px;
    font-weight: normal;
    opacity: 0.85;
}
@media (max-width: 767px) {
    .char-ranking .ttl-sky-light .inner .event-title-sub {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }
}

/* BJランキング: ツールバー（非公開チェック + 総合/報酬タブ） */
.ranking-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    min-height: 24px;
}
.ranking-privacy-label {
    font-size: 12px;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ranking-privacy-label input[type="checkbox"] {
    accent-color: #e91e63;
}

/* BJランキング: 総合/報酬 切替タブ */
.ranking-scope-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-left: auto;
}
.ranking-scope-tabs span {
    cursor: pointer;
    color: #888;
}
.ranking-scope-tabs span.sep {
    cursor: default;
    color: #ccc;
}
.ranking-scope-tabs span.active {
    color: #e91e63;
    font-weight: bold;
}

/* BJランキング: キャストアイコン */
.rank-actor-icon {
    height: 60px;
    width: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #e91e63;
    vertical-align: middle;
    margin-right: 4px;
}

/* SP: チャット内ポイント表示 */
@media (max-width: 767px) {
    .chat .chatbg-roomstatus.dom-point .pointstatus .point-row {
        display: flex;
        width: 100%;
        z-index: 1;
        font-size: 11px;
        white-space: nowrap;
        overflow: visible;
    }
    .chat .chatbg-roomstatus.dom-point .pointstatus .point-row span {
        flex: none;
        text-align: left;
        width: auto;
        margin-right: 8px;
    }
    .chat .chatbg-roomstatus.dom-point .pointstatus .rest-row {
        width: auto;
        text-align: right;
        font-size: 11px;
        font-weight: bold;
        color: #c23030;
        z-index: 1;
        white-space: nowrap;
        position: absolute;
        right: 6px;
        top: 50%;
        transform: translateY(-50%);
    }
}
@media (max-width: 300px) {
    .chat .chatbg-roomstatus.dom-point .pointstatus .rest-row {
        display: none;
    }
}

/* 残り時間ゲージ: 右端のラベル（5分/1分） */
.chat .pointstatus .rest_gauge_label {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%);
    font-weight: bold;
    color: #c23030;
    font-size: 0.9em;
    z-index: 2;
    margin-left: auto;
}

/* 残り時間ゲージ：端から端まで光沢が流れるアニメーション */
.chat .pointstatus .rest_bar {
    overflow: hidden;
    transition: width 0.6s ease-out, background-color 0.5s ease;
}
.chat .pointstatus .rest_bar::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-image: linear-gradient(to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.7) 50%,
        rgba(255,255,255,0) 100%);
    transform: translateX(100%);
    animation: rest_bar_flow 8s linear infinite;
}
@keyframes rest_bar_flow {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* イベント限定親密度: Exp 増加時の shine sweep */
.gauge-area {
    position: relative;
}
.gauge-area .gauge {
    position: relative;
    overflow: hidden;
}
@keyframes gauge-shine {
    0%   { transform: translateX(-100%); opacity: 1; }
    100% { transform: translateX(200%); opacity: 0; }
}
.gauge-area .gauge.shine::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    background: linear-gradient(90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.7) 50%,
        rgba(255,255,255,0) 100%);
    animation: gauge-shine 0.6s ease-out forwards;
    pointer-events: none;
}

/* ポイント残少ふわふわ点滅（残1pt以下 & 15秒以内） */
@keyframes point-fade-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}
.chat .pointstatus.point-fading {
    animation: point-fade-pulse 2s ease-in-out infinite;
}

/* +N Exp フローティング */
@keyframes exp-float {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-28px); }
}
.exp-float-badge {
    position: absolute;
    right: 8px;
    top: -6px;
    font-size: 12px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    animation: exp-float 1.2s ease-out forwards;
    pointer-events: none;
    z-index: 5;
}

/* イベント限定親密度ランキング */
.ranking-modal table td.rank {
    font-size: 14px;
    width: 20%;
}
.ranking-modal table td.level {
    font-size: 14px;
    width: 25%;
}
.ranking-modal table td.total_exp {
    font-size: 14px;
    width: 25%;
}
.ranking-name {
    font-size: 12px;
    width: 30%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ranking-name--self {
    font-weight: bold;
}

/* 点滅アニメーション速度（ビルド不要で上書き） */
.blink {
    animation-duration: 1.5s !important;
}

/* ポイント購入モーダルのスクロール対応（ビルド不要で上書き） */
/* 項目数が多い時に下部が見切れないよう、内側で縦スクロールさせる */
/* footer.blade.php のポイント購入モーダルだけに当たるよう .point-buy-modal で絞っている。
   shop/index.blade.php も同じ #js_modal_sales を使っているため、ID で絞ると副作用が出る。 */
.point-buy-modal .dialog_popup {
    margin-top: 50px !important;
    margin-bottom: 50px !important;
}
.point-buy-modal .dialog_popup-inner {
    /* 100vh はモバイルWebView/iOS Safari で URL バー展開時に実領域より大きく出るため、
       100dvh（動的ビューポート高）を優先。dvh 未対応ブラウザは vh にフォールバック。 */
    max-height: calc(100vh - 108px); /* margin50+50 + border4+4 */
    max-height: calc(100dvh - 108px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
/* 閉じる×ボタンが画面ヘッダーに隠れないように z-index を引き上げ */
.point-buy-modal .dialog-close {
    z-index: 10;
}

/* マイページ「イベント記録一覧」のテキストを画像の下段（=画像と重ならない別行）に表示する
   元 SCSS は .info を画像にオーバーレイ表示しているため、ここで上書きする。
   並び順: 画像 → 区切り線 → キャラ名 → ランキング */
.event .event_reward .body .box-event {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
}
.event .event_reward .body .box-event img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
}
.event .event_reward .body .box-event .info {
    /* position: relative は voice ボタンの絶対配置基準として残す。
       元の position:absolute による画像オーバーレイは解除される（top/bottom 指定なし） */
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    background: transparent !important;
    border-top: 1px solid #fd7bb6 !important;
    padding: 8px 10px !important;
}
.event .event_reward .body .box-event .info .btn-voice {
    position: absolute !important;
    right: 8px !important;
    bottom: 8px !important;
    top: auto !important;
    width: 30px !important;
}

/* イベント案内 ヘッダーバナー（白カード型・PC専用・3状態）
   テンプレート: resources/views/event/_shared/header_banner.blade.php
   PC専用は none_sp（SPで display:none !important）で担保。 */
/* イベントページ タブ列: 中途半端な幅で「3-1」に割れるのを防ぐ。
   狭い幅では2列(4タブ=2x2)、広い幅(>=600px)では1行に並べる。
   ボタンの色は各 info_*.blade.php の tabBtnStyle()（Vueインライン）が担当。 */
.evt-tab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    max-width: 460px;
    margin: 0 auto 15px;
}
.evt-tab-grid > button {
    width: 100%;
}
@media (min-width: 600px) {
    .evt-tab-grid {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        max-width: none;
    }
    .evt-tab-grid > button {
        width: auto;
    }
}

/* イベントページ サブタブ列: 縦並び（狭い幅）になったら全幅まで広げる。
   メインタブ(.evt-tab-grid)と同じ max-width に揃えて左右を合わせる。
   広い幅(>=600px)では従来どおり1行に並べる。 */
.evt-subtab-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    max-width: 460px;
    margin: 0 auto 12px;
}
.evt-subtab-stack > button,
.evt-subtab-stack > a {
    width: 100%;
    box-sizing: border-box;
}
@media (min-width: 600px) {
    .evt-subtab-stack {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        max-width: none;
    }
    .evt-subtab-stack > button,
    .evt-subtab-stack > a {
        width: auto;
    }
}

/* 共通: 白カード・ピンク文字 */
.event-header-banner {
    background: #fff;
    border: 1px solid #f3b3cd;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
    text-decoration: none;
    line-height: 1.35;
    transition: transform .15s ease, box-shadow .15s ease;
}
.event-header-banner:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(214, 0, 107, 0.20);
}
.event-header-banner .ehb-headline {
    font-weight: bold;
    color: #d6006b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.event-header-banner .ehb-sub {
    color: #e0578d;
    white-space: nowrap;
}

/* PC: ロゴ（float:left）の右横に並べる白カード（2行） */
.event-header-banner--pc {
    float: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 460px;
    margin: 10px 0 0 16px;       /* ロゴとの間隔 + 縦位置の微調整 */
    padding: 7px 18px;
}
.event-header-banner--pc .ehb-headline { font-size: 14px; }
.event-header-banner--pc .ehb-sub { font-size: 11px; }

/* SP: ロゴ行の下に全幅の細い1行リボン */
.event-header-banner--sp {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 6px 10px;
    padding: 6px 12px;
}
.event-header-banner--sp .ehb-headline { font-size: 13px; flex: 1 1 auto; min-width: 0; }
.event-header-banner--sp .ehb-sub { font-size: 11px; flex: 0 0 auto; }
