Spaces:
Runtime error
Runtime error
| /* 麻理チャット用カスタムCSS - 新デザインシステム */ | |
| /* Google Fonts読み込み */ | |
| @import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;700&family=Noto+Sans+JP:wght@300;400;500;700&display=swap'); | |
| /* === CSS カスタムプロパティ(テーマ変数) === */ | |
| :root { | |
| /* 新しいカラーパレット - コントラスト改善版 */ | |
| --base-color: #FAF3E0; /* クリーム色(背景) */ | |
| --text-color: #333333; /* 濃い灰色(テキスト) - 視認性向上 */ | |
| --mari-bubble-bg: #F5F5F5; /* オフホワイト(麻理の吹き出し) */ | |
| --user-bubble-bg: #A8D0B0; /* より濃い緑(ユーザーの吹き出し) - コントラスト比改善 */ | |
| --hidden-bubble-bg: #FFF8E1; /* 暖かいクリーム(本音の吹き出し) */ | |
| --icon-color: #3D2F24; /* ダークセピア(アイコン・ボタン) */ | |
| /* フォントファミリー */ | |
| --mari-font: "しっぽり明朝", "Noto Serif JP", "Yu Mincho", "YuMincho", "Hiragino Mincho Pro", "Times New Roman", serif; | |
| --ui-font: "Noto Sans JP", "M PLUS 1p", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; | |
| /* アニメーション設定 */ | |
| --transition-smooth: all 0.3s ease; | |
| --transition-slow: all 0.5s ease; | |
| } | |
| /* === グローバルスタイル === */ | |
| * { | |
| font-family: var(--ui-font) ; | |
| } | |
| /* === メインアプリケーション === */ | |
| .stApp { | |
| /* 背景は動的に設定されるため、ここでは基本設定のみ */ | |
| color: var(--text-color); | |
| min-height: auto ; | |
| } | |
| /* アプリケーションコンテナ - 動的背景を優先 */ | |
| /* ベースのbody背景は透過にしておく */ | |
| body { | |
| background: none ; | |
| } | |
| /* 背景画像は動的にJavaScriptで設定されるため、静的な設定は削除 */ | |
| /* Streamlit内部背景透過で下の背景を見せる */ | |
| /* .stAppは動的に背景が設定されるため、透過設定を削除 */ | |
| [data-testid="stAppViewContainer"] > section, | |
| [data-testid="stAppViewContainer"] > section > div.block-container, | |
| .main .block-container { | |
| background: transparent ; | |
| } | |
| /* 操作可能な要素のz-indexを確実に上げる */ | |
| .stApp [data-testid="stChatInput"], | |
| .stApp [data-testid="stSidebar"], | |
| .stApp .stButton, | |
| .stApp .stTextInput, | |
| .stApp .stSelectbox, | |
| .stApp .stCheckbox, | |
| .stApp .stRadio, | |
| .stApp .stSlider, | |
| .stApp .stProgress, | |
| .stApp .stMetric, | |
| .stApp .stExpander, | |
| .stApp .stTabs { | |
| position: relative ; | |
| z-index: 1000 ; | |
| } | |
| /* チャットメッセージのz-indexも上げる */ | |
| .stApp .stChatMessage { | |
| position: relative ; | |
| z-index: 1000 ; | |
| } | |
| /* メインコンテンツエリアの背景を調整 - 縦長対応 */ | |
| .main .block-container { | |
| background: transparent ; | |
| border-radius: 15px ; | |
| padding: 20px ; | |
| margin: 10px ; | |
| backdrop-filter: none ; | |
| min-height: auto ; | |
| padding-bottom: 150px ; | |
| } | |
| /* タブエリアの背景を明示的に設定 */ | |
| .stTabs { | |
| background: rgba(255, 255, 255, 0.95) ; | |
| backdrop-filter: blur(10px) ; | |
| border-radius: 10px ; | |
| padding: 10px ; | |
| margin: 10px 0 ; | |
| box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) ; | |
| } | |
| /* タブコンテンツの背景 - 縦長対応 */ | |
| .stTabs [data-baseweb="tab-panel"] { | |
| background: rgba(255, 255, 255, 0.98) ; | |
| backdrop-filter: blur(15px) ; | |
| border-radius: 8px ; | |
| padding: 20px ; | |
| margin-top: 10px ; | |
| min-height: auto ; | |
| max-height: none ; | |
| } | |
| /* タブヘッダーの背景 */ | |
| .stTabs [data-baseweb="tab-list"] { | |
| background: rgba(255, 255, 255, 0.9) ; | |
| backdrop-filter: blur(10px) ; | |
| border-radius: 8px 8px 0 0 ; | |
| padding: 5px ; | |
| } | |
| /* === チャットメッセージ === */ | |
| .stChatMessage { | |
| background: rgba(255, 255, 255, 0.98) ; | |
| backdrop-filter: blur(15px) ; | |
| border-radius: 12px ; | |
| border: 1px solid rgba(0, 0, 0, 0.1) ; | |
| margin: 8px 0 ; | |
| margin-bottom: 12px ; | |
| box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) ; | |
| transition: all 0.3s ease; | |
| color: #333333 ; | |
| font-family: var(--ui-font) ; | |
| font-size: 18px ; | |
| position: relative ; | |
| z-index: 1000 ; | |
| } | |
| /* チャットメッセージ内のすべてのテキスト要素を確実に黒文字に */ | |
| .stChatMessage * { | |
| color: #333333 ; | |
| } | |
| /* チャットメッセージ内のマークダウン要素 */ | |
| .stChatMessage p, | |
| .stChatMessage div, | |
| .stChatMessage span { | |
| color: #333333 ; | |
| } | |
| /* 最後のチャットメッセージに追加の下部マージンを設定 */ | |
| .stChatMessage:last-of-type { | |
| margin-bottom: 120px ; | |
| } | |
| .stChatMessage:hover { | |
| background: rgba(255, 255, 255, 1) ; | |
| border: 1px solid rgba(0, 0, 0, 0.2) ; | |
| transform: translateY(-2px); | |
| box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) ; | |
| } | |
| /* ユーザーメッセージ */ | |
| .stChatMessage[data-testid="user-message"] { | |
| background: var(--user-bubble-bg) ; | |
| border: 1px solid rgba(168, 208, 176, 0.6) ; | |
| color: #333333 ; | |
| font-family: var(--ui-font) ; | |
| font-size: 18px ; | |
| } | |
| /* ユーザーメッセージ内のすべてのテキスト要素 */ | |
| .stChatMessage[data-testid="user-message"] * { | |
| color: #333333 ; | |
| } | |
| /* アシスタントメッセージ(麻理の対話) */ | |
| .stChatMessage[data-testid="assistant-message"] { | |
| background: var(--mari-bubble-bg) ; | |
| border: 1px solid rgba(0, 0, 0, 0.1) ; | |
| color: #333333 ; | |
| font-family: var(--mari-font) ; | |
| line-height: 1.7 ; | |
| font-size: 18px ; | |
| } | |
| /* アシスタントメッセージ内のすべてのテキスト要素 */ | |
| .stChatMessage[data-testid="assistant-message"] * { | |
| color: #333333 ; | |
| } | |
| /* アシスタントメッセージ内のマークダウン要素 */ | |
| .stChatMessage[data-testid="assistant-message"] p, | |
| .stChatMessage[data-testid="assistant-message"] div, | |
| .stChatMessage[data-testid="assistant-message"] span { | |
| color: #333333 ; | |
| } | |
| /* 隠された真実の吹き出し */ | |
| .stChatMessage[data-testid="assistant-message"].hidden-truth { | |
| background: var(--hidden-bubble-bg) ; | |
| border: 1px solid rgba(255, 248, 225, 0.7) ; | |
| box-shadow: 0 2px 8px rgba(255, 248, 225, 0.3) ; | |
| } | |
| /* 麻理の初期メッセージアニメーション */ | |
| .mari-initial-message { | |
| color: #333333 ; /* 黒文字で表示 */ | |
| font-weight: 500; | |
| background-color: transparent ; | |
| animation: popIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55); | |
| } | |
| /* Streamlitのチャットメッセージ内での初期メッセージ */ | |
| .stChatMessage .mari-initial-message { | |
| color: #333333 ; /* 黒文字で表示 */ | |
| font-weight: 500; | |
| } | |
| /* より具体的なセレクタでStreamlitのデフォルトスタイルを上書き */ | |
| div[data-testid="stChatMessage"] .mari-initial-message { | |
| color: #333333 ; /* 黒文字で表示 */ | |
| font-weight: 500; | |
| } | |
| /* Streamlitのチャットメッセージ要素全体に対する強制的な文字色設定 */ | |
| div[data-testid="stChatMessage"], | |
| div[data-testid="stChatMessage"] *, | |
| div[data-testid="assistant-message"], | |
| div[data-testid="assistant-message"] *, | |
| div[data-testid="user-message"], | |
| div[data-testid="user-message"] * { | |
| color: #333333 ; | |
| } | |
| /* Streamlitのマークダウン要素 */ | |
| div[data-testid="stChatMessage"] .stMarkdown, | |
| div[data-testid="stChatMessage"] .stMarkdown *, | |
| div[data-testid="stChatMessage"] .element-container, | |
| div[data-testid="stChatMessage"] .element-container * { | |
| color: #333333 ; | |
| } | |
| @keyframes popIn { | |
| 0% { | |
| opacity: 0; | |
| transform: scale(0.3) translateY(20px); | |
| } | |
| 50% { | |
| opacity: 0.8; | |
| transform: scale(1.05) translateY(-5px); | |
| } | |
| 100% { | |
| opacity: 1; | |
| transform: scale(1) translateY(0); | |
| } | |
| } | |
| /* 自動スクロール用のスムーズスクロール */ | |
| .chat-container { | |
| scroll-behavior: smooth; | |
| } | |
| /* === サイドバー === */ | |
| [data-testid="stSidebar"], | |
| [data-testid="stSidebar"] > div, | |
| [data-testid="stSidebar"] > div > div, | |
| .stSidebar, | |
| .stSidebar > div { | |
| background: #FAF3E0 ; /* クリーム色の不透明背景 */ | |
| border-right: 1px solid rgba(61, 47, 36, 0.3) ; | |
| /* backdrop-filterを削除して透過効果をなくす */ | |
| backdrop-filter: none ; | |
| /* 透過を完全に無効化 */ | |
| opacity: 1 ; | |
| } | |
| /* サイドバーの最上位コンテナも確実に設定 */ | |
| section[data-testid="stSidebar"] { | |
| background: #FAF3E0 ; | |
| backdrop-filter: none ; | |
| } | |
| /* サイドバー内のテキスト */ | |
| [data-testid="stSidebar"] .stMarkdown, | |
| [data-testid="stSidebar"] label { | |
| color: var(--text-color) ; | |
| font-family: var(--ui-font) ; | |
| text-shadow: none; | |
| background: transparent ; /* テキスト要素は透過 */ | |
| } | |
| /* サイドバー内のすべての要素の背景を制御 */ | |
| [data-testid="stSidebar"] * { | |
| backdrop-filter: none ; | |
| } | |
| /* サイドバー内のメトリクス(好感度表示)*/ | |
| [data-testid="stSidebar"] .stMetric { | |
| background: rgba(255, 255, 255, 1.0) ; /* 完全不透明の白背景 */ | |
| padding: 10px ; | |
| border-radius: 8px ; | |
| border: 1px solid rgba(0, 0, 0, 0.1) ; | |
| margin: 5px 0 ; | |
| } | |
| [data-testid="stSidebar"] .stMetric [data-testid="metric-container"] { | |
| background: transparent ; | |
| } | |
| [data-testid="stSidebar"] .stMetric [data-testid="metric-container"]>div { | |
| color: var(--text-color) ; | |
| font-family: var(--ui-font) ; | |
| } | |
| [data-testid="stSidebar"] .stMetric [data-testid="metric-container"]>div:first-child { | |
| color: var(--text-color) ; | |
| font-size: 0.9em ; | |
| font-weight: 500 ; | |
| font-family: var(--ui-font) ; | |
| } | |
| [data-testid="stSidebar"] .stMetric [data-testid="metric-container"]>div:last-child { | |
| color: var(--text-color) ; | |
| font-weight: bold ; | |
| font-size: 1.4em ; | |
| font-family: var(--ui-font) ; | |
| } | |
| /* サイドバー内のすべてのメトリクステキストを統一カラーにする */ | |
| [data-testid="stSidebar"] .stMetric * { | |
| color: var(--text-color) ; | |
| font-family: var(--ui-font) ; | |
| } | |
| /* === 入力フィールド === */ | |
| .stTextInput>div>div>input { | |
| background: rgba(255, 255, 255, 0.95) ; | |
| color: var(--text-color) ; | |
| border: 1px solid rgba(61, 47, 36, 0.4) ; | |
| border-radius: 8px ; | |
| backdrop-filter: blur(5px); | |
| transition: all 0.3s ease; | |
| font-family: var(--ui-font) ; | |
| } | |
| .stTextInput>div>div>input:focus { | |
| background: rgba(255, 255, 255, 1) ; | |
| border: 1px solid rgba(61, 47, 36, 0.7) ; | |
| box-shadow: 0 0 10px rgba(61, 47, 36, 0.3) ; | |
| } | |
| .stTextInput>div>div>input::placeholder { | |
| color: rgba(61, 47, 36, 0.7) ; | |
| } | |
| /* === チャット入力フォーム固定スタイル === */ | |
| /* フォーム全体を画面下部に固定 */ | |
| [data-testid="stForm"] { | |
| position: fixed ; | |
| bottom: 20px ; | |
| left: 50% ; | |
| transform: translateX(-50%) ; | |
| width: calc(100% - 40px) ; | |
| max-width: 800px ; | |
| z-index: 999 ; | |
| background: rgba(255, 255, 255, 0.95) ; | |
| backdrop-filter: blur(15px) ; | |
| border-radius: 25px ; | |
| border: 2px solid rgba(61, 47, 36, 0.2) ; | |
| box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) ; | |
| padding: 15px 20px ; | |
| transition: all 0.3s ease ; | |
| } | |
| [data-testid="stForm"]:hover { | |
| background: rgba(255, 255, 255, 1) ; | |
| border: 2px solid rgba(61, 47, 36, 0.4) ; | |
| box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2) ; | |
| transform: translateX(-50%) translateY(-2px) ; | |
| } | |
| /* チャット履歴エリアに下部マージンを追加 - 縦長対応 */ | |
| .stChatMessage:last-of-type { | |
| margin-bottom: 200px ; | |
| } | |
| /* チャット履歴コンテナの高さ調整 */ | |
| .chat-history-container { | |
| min-height: auto ; | |
| max-height: none ; | |
| } | |
| /* === 浮遊カードスタイル入力エリア(旧stChatInput用) === */ | |
| .stChatInput { | |
| position: sticky ; | |
| bottom: 30px ; | |
| z-index: 100 ; | |
| padding: 0 20px ; | |
| margin-top: 40px ; | |
| } | |
| .stChatInput > div { | |
| background: rgba(255, 255, 255, 0.95) ; | |
| backdrop-filter: blur(15px) ; | |
| border-radius: 25px ; | |
| border: 2px solid rgba(61, 47, 36, 0.2) ; | |
| box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) ; | |
| padding: 15px 20px ; | |
| transition: all 0.3s ease ; | |
| position: relative ; | |
| } | |
| .stChatInput > div:hover { | |
| background: rgba(255, 255, 255, 1) ; | |
| border: 2px solid rgba(61, 47, 36, 0.4) ; | |
| box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2) ; | |
| transform: translateY(-2px) ; | |
| } | |
| /* チャット入力フィールドのスタイル */ | |
| .stChatInput>div>div>input { | |
| background: transparent ; | |
| color: var(--text-color) ; | |
| border: none ; | |
| border-radius: 0 ; | |
| font-family: var(--ui-font) ; | |
| font-size: 16px ; | |
| padding: 8px 50px 8px 15px ; | |
| outline: none ; | |
| box-shadow: none ; | |
| } | |
| .stChatInput>div>div>input:focus { | |
| background: transparent ; | |
| border: none ; | |
| box-shadow: none ; | |
| outline: none ; | |
| } | |
| .stChatInput>div>div>input::placeholder { | |
| color: rgba(61, 47, 36, 0.6) ; | |
| font-style: italic ; | |
| } | |
| /* 送信ボタンのスタイル(紙飛行機アイコン) */ | |
| .stChatInput button { | |
| position: absolute ; | |
| right: 15px ; | |
| top: 50% ; | |
| transform: translateY(-50%) ; | |
| background: linear-gradient(45deg, var(--text-color), #5B4636) ; | |
| color: white ; | |
| border: none ; | |
| border-radius: 50% ; | |
| width: 40px ; | |
| height: 40px ; | |
| display: flex ; | |
| align-items: center ; | |
| justify-content: center ; | |
| font-size: 16px ; | |
| cursor: pointer ; | |
| transition: all 0.3s ease ; | |
| box-shadow: 0 4px 12px rgba(61, 47, 36, 0.3) ; | |
| } | |
| .stChatInput button:hover { | |
| background: linear-gradient(45deg, #5B4636, var(--text-color)) ; | |
| transform: translateY(-50%) scale(1.1) ; | |
| box-shadow: 0 6px 16px rgba(61, 47, 36, 0.4) ; | |
| } | |
| .stChatInput button:active { | |
| transform: translateY(-50%) scale(0.95) ; | |
| } | |
| /* 送信ボタンのアイコンを紙飛行機に変更 */ | |
| .stChatInput button::before { | |
| content: "➢" ; | |
| font-size: 18px ; | |
| line-height: 1 ; | |
| } | |
| /* 元のボタンテキストを非表示 */ | |
| .stChatInput button span { | |
| display: none ; | |
| } | |
| /* 無効化状態のスタイル */ | |
| .stChatInput[data-disabled="true"] > div, | |
| .stChatInput:has(input:disabled) > div { | |
| background: rgba(200, 200, 200, 0.7) ; | |
| border: 2px solid rgba(150, 150, 150, 0.3) ; | |
| cursor: not-allowed ; | |
| } | |
| .stChatInput[data-disabled="true"] input, | |
| .stChatInput input:disabled { | |
| color: rgba(100, 100, 100, 0.7) ; | |
| cursor: not-allowed ; | |
| } | |
| .stChatInput[data-disabled="true"] button, | |
| .stChatInput:has(input:disabled) button { | |
| background: rgba(150, 150, 150, 0.5) ; | |
| cursor: not-allowed ; | |
| transform: translateY(-50%) ; | |
| } | |
| .stChatInput[data-disabled="true"] button:hover, | |
| .stChatInput:has(input:disabled) button:hover { | |
| background: rgba(150, 150, 150, 0.5) ; | |
| transform: translateY(-50%) ; | |
| box-shadow: 0 4px 12px rgba(150, 150, 150, 0.3) ; | |
| } | |
| /* 入力エリア全体のアニメーション効果 */ | |
| .stChatInput > div::before { | |
| content: '' ; | |
| position: absolute ; | |
| top: -2px ; | |
| left: -2px ; | |
| right: -2px ; | |
| bottom: -2px ; | |
| background: linear-gradient(45deg, | |
| rgba(61, 47, 36, 0.1), | |
| rgba(245, 245, 245, 0.1), | |
| rgba(61, 47, 36, 0.1)) ; | |
| border-radius: 27px ; | |
| z-index: -1 ; | |
| opacity: 0 ; | |
| transition: opacity 0.3s ease ; | |
| } | |
| .stChatInput > div:focus-within::before { | |
| opacity: 1 ; | |
| animation: borderGlow 2s ease-in-out infinite ; | |
| } | |
| @keyframes borderGlow { | |
| 0%, 100% { | |
| background: linear-gradient(45deg, | |
| rgba(61, 47, 36, 0.2), | |
| rgba(245, 245, 245, 0.2), | |
| rgba(61, 47, 36, 0.2)); | |
| } | |
| 50% { | |
| background: linear-gradient(45deg, | |
| rgba(61, 47, 36, 0.4), | |
| rgba(245, 245, 245, 0.4), | |
| rgba(61, 47, 36, 0.4)); | |
| } | |
| } | |
| /* === フォーム内の入力フィールドスタイル === */ | |
| [data-testid="stForm"] .stTextInput > div > div > input { | |
| background: transparent ; | |
| color: var(--text-color) ; | |
| border: none ; | |
| border-radius: 0 ; | |
| font-family: var(--ui-font) ; | |
| font-size: 16px ; | |
| padding: 8px 15px ; | |
| outline: none ; | |
| box-shadow: none ; | |
| } | |
| [data-testid="stForm"] .stTextInput > div > div > input:focus { | |
| background: transparent ; | |
| border: none ; | |
| box-shadow: none ; | |
| outline: none ; | |
| } | |
| [data-testid="stForm"] .stTextInput > div > div > input::placeholder { | |
| color: rgba(61, 47, 36, 0.6) ; | |
| font-style: italic ; | |
| } | |
| /* === フォーム内の送信ボタンスタイル === */ | |
| [data-testid="stForm"] .stButton > button { | |
| background: linear-gradient(45deg, var(--text-color), #5B4636) ; | |
| color: white ; | |
| border: none ; | |
| border-radius: 20px ; | |
| font-weight: 500 ; | |
| font-family: var(--ui-font) ; | |
| transition: all 0.3s ease ; | |
| box-shadow: 0 4px 12px rgba(61, 47, 36, 0.3) ; | |
| } | |
| [data-testid="stForm"] .stButton > button:hover { | |
| background: linear-gradient(45deg, #5B4636, var(--text-color)) ; | |
| transform: scale(1.05) ; | |
| box-shadow: 0 6px 16px rgba(61, 47, 36, 0.4) ; | |
| } | |
| [data-testid="stForm"] .stButton > button:active { | |
| transform: scale(0.95) ; | |
| } | |
| /* === ボタン === */ | |
| .stButton>button { | |
| background: rgba(255, 255, 255, 0.95) ; | |
| color: var(--text-color) ; | |
| border: 1px solid rgba(61, 47, 36, 0.4) ; | |
| border-radius: 8px ; | |
| backdrop-filter: blur(5px); | |
| transition: all 0.3s ease; | |
| font-weight: 500; | |
| font-family: var(--ui-font) ; | |
| } | |
| .stButton>button:hover { | |
| background: rgba(255, 255, 255, 1) ; | |
| border: 1px solid rgba(61, 47, 36, 0.6) ; | |
| transform: translateY(-2px); | |
| box-shadow: 0 4px 15px rgba(61, 47, 36, 0.3) ; | |
| } | |
| .stButton>button:active { | |
| transform: translateY(0); | |
| } | |
| /* プライマリボタン */ | |
| .stButton>button[kind="primary"] { | |
| background: linear-gradient(45deg, #667eea, #764ba2) ; | |
| border: 1px solid rgba(255, 255, 255, 0.4) ; | |
| color: white ; | |
| } | |
| .stButton>button[kind="primary"]:hover { | |
| background: linear-gradient(45deg, #5a6fd8, #6a4190) ; | |
| } | |
| /* セカンダリボタン */ | |
| .stButton>button[kind="secondary"] { | |
| background: rgba(255, 255, 255, 0.8) ; | |
| border: 1px solid rgba(61, 47, 36, 0.4) ; | |
| color: var(--text-color) ; | |
| } | |
| /* === プログレスバー(好感度ゲージ用) === */ | |
| /* チュートリアル進行バーのみを非表示にする(クラス名で区別) */ | |
| .tutorial-progress { | |
| display: none ; | |
| } | |
| /* 好感度プログレスバーのスタイル */ | |
| .stProgress { | |
| background: rgba(255, 255, 255, 0.95) ; | |
| border-radius: 10px ; | |
| border: 1px solid rgba(0, 0, 0, 0.1) ; | |
| padding: 5px ; | |
| margin: 10px 0 ; | |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) ; | |
| } | |
| .stProgress > div > div { | |
| background: linear-gradient(90deg, #ff69b4, #ff1493) ; | |
| border-radius: 8px ; | |
| transition: all 0.3s ease ; | |
| } | |
| /* サイドバー内の好感度プログレスバー */ | |
| [data-testid="stSidebar"] .stProgress { | |
| background: rgba(255, 255, 255, 1.0) ; | |
| border-radius: 8px ; | |
| border: 1px solid rgba(0, 0, 0, 0.1) ; | |
| padding: 8px ; | |
| margin: 8px 0 ; | |
| } | |
| [data-testid="stSidebar"] .stProgress > div > div { | |
| background: linear-gradient(90deg, #ff69b4, #ff1493) ; | |
| border-radius: 6px ; | |
| height: 12px ; | |
| } | |
| /* === Expander(折りたたみ要素)のスタイル === */ | |
| [data-testid="stExpander"] { | |
| background: rgba(255, 255, 255, 0.95) ; | |
| border: 2px solid rgba(100, 149, 237, 0.3) ; | |
| border-radius: 15px ; | |
| backdrop-filter: blur(10px); | |
| box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) ; | |
| margin: 15px 0 ; | |
| transition: all 0.3s ease; | |
| } | |
| [data-testid="stExpander"]:hover { | |
| border: 2px solid rgba(100, 149, 237, 0.5) ; | |
| box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) ; | |
| transform: translateY(-2px); | |
| } | |
| [data-testid="stExpander"] summary { | |
| /* Expanderのヘッダー部分 */ | |
| font-size: 1.2em ; | |
| font-weight: 600 ; | |
| color: #2c3e50 ; | |
| padding: 15px 20px ; | |
| background: rgba(100, 149, 237, 0.1) ; | |
| border-radius: 12px ; | |
| margin: -1px ; | |
| transition: all 0.3s ease; | |
| } | |
| [data-testid="stExpander"] summary:hover { | |
| background: rgba(100, 149, 237, 0.2) ; | |
| color: #1a252f ; | |
| } | |
| /* Expanderの中身のスタイル */ | |
| [data-testid="stExpander"] .streamlit-expanderContent { | |
| padding: 20px ; | |
| background: rgba(255, 255, 255, 0.98) ; | |
| border-radius: 0 0 12px 12px ; | |
| } | |
| /* チュートリアル用の特別なスタイル */ | |
| [data-testid="stExpander"] .streamlit-expanderContent h3 { | |
| color: #2c3e50 ; | |
| font-size: 1.1em ; | |
| margin: 15px 0 8px 0 ; | |
| padding-bottom: 5px ; | |
| border-bottom: 2px solid rgba(100, 149, 237, 0.3) ; | |
| } | |
| [data-testid="stExpander"] .streamlit-expanderContent ul { | |
| margin: 10px 0 ; | |
| padding-left: 20px ; | |
| } | |
| [data-testid="stExpander"] .streamlit-expanderContent li { | |
| margin: 5px 0 ; | |
| color: #34495e ; | |
| line-height: 1.6 ; | |
| } | |
| [data-testid="stExpander"] .streamlit-expanderContent strong { | |
| color: #2980b9 ; | |
| font-weight: 600 ; | |
| } | |
| /* チュートリアルの最終メッセージを強調 */ | |
| [data-testid="stExpander"] .streamlit-expanderContent p:last-child { | |
| background: linear-gradient(45deg, rgba(100, 149, 237, 0.1), rgba(155, 89, 182, 0.1)) ; | |
| padding: 12px 15px ; | |
| border-radius: 8px ; | |
| border-left: 4px solid #3498db ; | |
| font-weight: 500 ; | |
| color: #2c3e50 ; | |
| margin-top: 15px ; | |
| } | |
| /* Expanderの開閉アニメーション */ | |
| [data-testid="stExpander"] .streamlit-expanderContent { | |
| animation: expanderFadeIn 0.3s ease-out; | |
| } | |
| @keyframes expanderFadeIn { | |
| from { | |
| opacity: 0; | |
| transform: translateY(-10px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| /* 中央寄せのためのコラムスタイル調整 */ | |
| .stColumns>div:first-child, | |
| .stColumns>div:last-child { | |
| padding: 0 ; | |
| } | |
| .stColumns>div:nth-child(2) { | |
| padding: 0 10px ; | |
| } | |
| /* === カスタムチャット履歴エリア === */ | |
| .chat-history-container { | |
| max-height: 500px ; | |
| overflow-y: auto ; | |
| padding: 15px ; | |
| background: rgba(255, 255, 255, 0.1) ; | |
| border-radius: 15px ; | |
| border: 2px solid rgba(255, 255, 255, 0.2) ; | |
| backdrop-filter: blur(10px) ; | |
| margin: 20px 0 ; | |
| box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) ; | |
| transition: all 0.3s ease ; | |
| } | |
| .chat-history-container:hover { | |
| border: 2px solid rgba(255, 255, 255, 0.4) ; | |
| box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) ; | |
| } | |
| .chat-message { | |
| margin: 12px 0 ; | |
| padding: 12px 16px ; | |
| border-radius: 12px ; | |
| max-width: 80% ; | |
| word-wrap: break-word ; | |
| animation: messageSlideIn 0.3s ease-out ; | |
| transition: all 0.3s ease ; | |
| } | |
| .chat-message:hover { | |
| transform: translateY(-2px) ; | |
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) ; | |
| } | |
| .chat-message.user { | |
| background: var(--user-bubble-bg) ; | |
| border: 1px solid rgba(168, 208, 176, 0.6) ; | |
| margin-left: auto ; | |
| text-align: right ; | |
| color: var(--text-color) ; | |
| font-family: var(--ui-font) ; | |
| text-shadow: none ; | |
| } | |
| .chat-message.assistant { | |
| background: var(--mari-bubble-bg) ; | |
| border: 1px solid rgba(245, 245, 245, 0.5) ; | |
| margin-right: auto ; | |
| color: var(--text-color) ; | |
| font-family: var(--mari-font) ; | |
| line-height: 1.7 ; | |
| text-shadow: none ; | |
| } | |
| .chat-message.initial { | |
| background: rgba(255, 20, 147, 0.2) ; | |
| border: 1px solid rgba(255, 20, 147, 0.4) ; | |
| animation: initialMessagePulse 2s ease-in-out ; | |
| } | |
| .message-role { | |
| font-size: 0.8em ; | |
| font-weight: bold ; | |
| margin-bottom: 5px ; | |
| opacity: 0.8 ; | |
| } | |
| .message-content { | |
| line-height: 1.5 ; | |
| font-size: 18px ; | |
| } | |
| @keyframes messageSlideIn { | |
| from { | |
| opacity: 0; | |
| transform: translateY(10px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| @keyframes initialMessagePulse { | |
| 0%, | |
| 100% { | |
| opacity: 1; | |
| } | |
| 50% { | |
| opacity: 0.7; | |
| } | |
| } | |
| /* チャット履歴コンテナのスクロールバー */ | |
| .chat-history-container::-webkit-scrollbar { | |
| width: 8px ; | |
| } | |
| .chat-history-container::-webkit-scrollbar-track { | |
| background: rgba(255, 255, 255, 0.1) ; | |
| border-radius: 4px ; | |
| } | |
| .chat-history-container::-webkit-scrollbar-thumb { | |
| background: rgba(255, 255, 255, 0.3) ; | |
| border-radius: 4px ; | |
| transition: background 0.3s ease ; | |
| } | |
| .chat-history-container::-webkit-scrollbar-thumb:hover { | |
| background: rgba(255, 255, 255, 0.5) ; | |
| } | |
| /* UI分裂防止のためのスタイル */ | |
| .stApp>div:first-child { | |
| position: relative ; | |
| z-index: 1 ; | |
| } | |
| /* チャット入力エリアの安定化 - 新しい浮遊カードスタイルに統合済み */ | |
| /* スピナー(考え中...)のスタイル改善 */ | |
| .stSpinner { | |
| position: fixed ; | |
| top: 50% ; | |
| left: 50% ; | |
| transform: translate(-50%, -50%) ; | |
| z-index: 1000 ; | |
| background: rgba(0, 0, 0, 0.8) ; | |
| padding: 20px ; | |
| border-radius: 10px ; | |
| color: white ; | |
| } | |
| /* 重複要素の防止 */ | |
| .stApp [data-testid="stAppViewContainer"] { | |
| overflow-x: hidden ; | |
| } | |
| /* タブコンテンツの安定化 - 縦長に拡張 */ | |
| .stTabs [data-baseweb="tab-panel"] { | |
| padding-top: 20px ; | |
| min-height: auto ; | |
| padding-bottom: 150px ; | |
| } | |
| /* === スクロールバー === */ | |
| ::-webkit-scrollbar { | |
| width: 8px; | |
| height: 8px; | |
| } | |
| ::-webkit-scrollbar-track { | |
| background: rgba(0, 0, 0, 0.1); | |
| border-radius: 4px; | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background: rgba(0, 0, 0, 0.3); | |
| border-radius: 4px; | |
| transition: background 0.3s ease; | |
| } | |
| ::-webkit-scrollbar-thumb:hover { | |
| background: rgba(0, 0, 0, 0.5); | |
| } | |
| ::-webkit-scrollbar-corner { | |
| background: transparent; | |
| } | |
| /* === テキストの可読性向上 === */ | |
| .stMarkdown, | |
| .stText { | |
| color: var(--text-color) ; | |
| font-family: var(--ui-font) ; | |
| text-shadow: none; | |
| } | |
| .stMarkdown h1, | |
| .stMarkdown h2, | |
| .stMarkdown h3 { | |
| color: var(--text-color) ; | |
| font-family: var(--ui-font) ; | |
| text-shadow: none; | |
| } | |
| /* フォームラベルのスタイル統一 */ | |
| .stTextInput label, | |
| .stSelectbox label, | |
| .stTextArea label { | |
| color: white ; | |
| font-family: var(--ui-font) ; | |
| font-weight: 500 ; | |
| text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) ; | |
| background: rgba(0, 0, 0, 0.3) ; | |
| padding: 4px 8px ; | |
| border-radius: 4px ; | |
| margin-bottom: 5px ; | |
| display: inline-block ; | |
| } | |
| /* === アクセシビリティ改善 === */ | |
| /* フォーカス状態の視認性向上 */ | |
| .stButton>button:focus, | |
| .stTextInput>div>div>input:focus, | |
| .stChatInput>div>div>input:focus { | |
| outline: 2px solid var(--text-color) ; | |
| outline-offset: 2px ; | |
| } | |
| /* === マスクアイコンとフリップアニメーション === */ | |
| .message-container { | |
| position: relative; | |
| perspective: 1000px; | |
| margin: 10px 0; | |
| } | |
| .message-flip { | |
| position: relative; | |
| width: 100%; | |
| height: auto; | |
| min-height: 60px; | |
| transform-style: preserve-3d; | |
| transition: transform 0.4s ease-in-out; | |
| } | |
| .message-flip.flipped { | |
| transform: rotateY(180deg); | |
| } | |
| .message-side { | |
| position: absolute; | |
| width: 100%; | |
| backface-visibility: hidden; | |
| padding: 15px 45px 15px 15px; | |
| border-radius: 12px; | |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | |
| font-family: var(--mari-font); | |
| line-height: 1.7; | |
| min-height: 50px; | |
| } | |
| .message-front { | |
| background: var(--mari-bubble-bg); | |
| border: 1px solid rgba(0, 0, 0, 0.1); | |
| color: var(--text-color); | |
| transform: rotateY(0deg); | |
| } | |
| .message-back { | |
| background: var(--hidden-bubble-bg); | |
| border: 1px solid rgba(255, 248, 225, 0.7); | |
| color: var(--text-color); | |
| transform: rotateY(180deg); | |
| box-shadow: 0 2px 8px rgba(255, 248, 225, 0.3); | |
| } | |
| .mask-icon { | |
| position: absolute; | |
| bottom: 12px; | |
| right: 12px; | |
| font-size: 20px; | |
| cursor: pointer; | |
| padding: 6px; | |
| border-radius: 50%; | |
| background: rgba(192, 65, 65, 0.9); | |
| transition: all 0.3s ease; | |
| z-index: 10; | |
| user-select: none; | |
| box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); | |
| } | |
| .mask-icon:hover { | |
| background: rgb(197, 89, 89); | |
| transform: scale(1.1); | |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); | |
| } | |
| .mask-icon:active { | |
| transform: scale(0.95); | |
| } | |
| .mask-icon.tutorial-pulse { | |
| animation: tutorialPulse 2s ease-in-out infinite; | |
| } | |
| @keyframes tutorialPulse { | |
| 0%, 100% { | |
| transform: scale(1); | |
| box-shadow: 0 0 0 0 rgba(255, 105, 180, 0.7); | |
| } | |
| 50% { | |
| transform: scale(1.1); | |
| box-shadow: 0 0 0 10px rgba(255, 105, 180, 0); | |
| } | |
| } | |
| /* === アニメーション === */ | |
| @keyframes fadeIn { | |
| from { | |
| opacity: 0; | |
| } | |
| to { | |
| opacity: 1; | |
| } | |
| } | |
| .scene-transition { | |
| animation: fadeIn 2s ease-in-out; | |
| } | |
| /* === レスポンシブ対応 === */ | |
| @media (max-width: 768px) { | |
| .stApp { | |
| background-attachment: scroll; | |
| } | |
| .stChatMessage { | |
| margin: 4px 0 ; | |
| border-radius: 8px ; | |
| font-size: 16px ; | |
| } | |
| /* モバイル向けチャット履歴調整 */ | |
| .chat-history-container { | |
| max-height: 400px ; | |
| padding: 10px ; | |
| margin: 15px 0 ; | |
| } | |
| .chat-message { | |
| max-width: 90% ; | |
| padding: 10px 12px ; | |
| margin: 8px 0 ; | |
| } | |
| .message-content { | |
| font-size: 16px ; | |
| } | |
| /* モバイル向け浮遊入力エリア調整 */ | |
| .stChatInput { | |
| bottom: 15px ; | |
| padding: 0 10px ; | |
| } | |
| /* モバイル版でも最後のメッセージに十分なマージンを確保 */ | |
| .stChatMessage:last-of-type { | |
| margin-bottom: 100px ; | |
| } | |
| .stChatInput > div { | |
| padding: 12px 15px ; | |
| border-radius: 20px ; | |
| } | |
| .stChatInput>div>div>input { | |
| font-size: 14px ; | |
| padding: 6px 45px 6px 12px ; | |
| } | |
| .stChatInput button { | |
| width: 35px ; | |
| height: 35px ; | |
| right: 12px ; | |
| } | |
| .stChatInput button::before { | |
| font-size: 16px ; | |
| } | |
| } | |
| /* --- ▼▼▼ 【UIクリーンアップのための追加ルール】 ▼▼▼ --- */ | |
| /* 1. Python側で生成される不要な要素を非表示 */ | |
| /* 謎のタブ、2本目のゲージ、カスタムステータス表示などをまとめて非表示 */ | |
| .status-display, | |
| .metric-container, | |
| .affection-gauge, | |
| [data-testid="stSidebar"] [data-testid="stHeading"] { | |
| display: none ; | |
| } | |
| /* 2. メトリクスの表示を改善(サイドバー以外) */ | |
| [data-testid="stMetric"] { | |
| background: rgba(223, 77, 77, 0.9) ; | |
| padding: 8px ; | |
| border-radius: 6px ; | |
| border: 1px solid rgba(0, 0, 0, 0.1) ; | |
| } | |
| [data-testid="stMetric"] [data-testid="metric-container"]>div { | |
| color: #2c3e50 ; | |
| } | |
| [data-testid="stMetric"] [data-testid="metric-container"]>div:first-child { | |
| color: #555 ; | |
| font-size: 0.9em ; | |
| } | |
| [data-testid="stMetric"] [data-testid="metric-container"]>div:last-child { | |
| color: #2c3e50 ; | |
| font-weight: bold ; | |
| font-size: 1.4em ; | |
| } | |
| /* サイドバー内のメトリクスを統一カラーにする */ | |
| [data-testid="stSidebar"] [data-testid="stMetric"] [data-testid="metric-container"]>div, | |
| [data-testid="stSidebar"] [data-testid="stMetric"] [data-testid="metric-container"]>div>div, | |
| [data-testid="stSidebar"] [data-testid="stMetric"] span, | |
| [data-testid="stSidebar"] [data-testid="stMetric"] p { | |
| color: var(--text-color) ; | |
| font-family: var(--ui-font) ; | |
| } | |
| /* 3. サイドバーのデバッグ用チェックボックスなどを非表示 */ | |
| [data-testid="stSidebar"] .stCheckbox, | |
| [data-testid="stSidebar"] .stSelectbox { | |
| display: none ; | |
| } |