diff --git a/style.css b/style.css index 43a78b3..f6a2814 100644 --- a/style.css +++ b/style.css @@ -1,323 +1,214 @@ -/* ============================== - 共通 -============================== */ +/* =============================== + 全体デザイン +================================= */ + body { margin: 0; - font-family: "Hiragino Sans", "Helvetica Neue", Arial, sans-serif; - user-select: none; + padding: 0; + font-family: "Hiragino Sans", "Noto Sans JP", sans-serif; + background: linear-gradient(135deg, #f0f4ff, #e8efff); + color: #333; } -/* ============================== - index.html 用 -============================== */ -body.index-page { - background: linear-gradient(135deg, #9be2ff, #c7f5d9); - min-height: 100vh; - display: flex; - justify-content: center; - align-items: center; - padding: 20px; -} +/* =============================== + index.html のフォームデザイン +================================= */ -.index-container { - width: 95%; - max-width: 450px; +.container { + max-width: 500px; + margin: 40px auto; + background: white; padding: 25px; - background: #ffffff; - border-radius: 18px; - box-shadow: 0 12px 30px rgba(0,0,0,0.12); + border-radius: 14px; + box-shadow: 0 4px 20px rgba(0,0,0,0.1); + animation: fadeIn 0.7s ease; +} + +h2 { + margin-top: 0; text-align: center; - animation: fadeIn 0.6s ease-out; + color: #4a6cd1; } -.index-container h1 { - margin: 0 0 15px; - font-size: 26px; - font-weight: 700; - color: #333; +label { + display: block; + margin: 12px 0 6px; + font-weight: bold; } -.index-container .desc { - margin-bottom: 20px; - color: #555; +input { + width: 100%; + padding: 10px 14px; + font-size: 1rem; + border-radius: 8px; + border: 1px solid #c8d3f0; + outline: none; + transition: border 0.2s; } -.index-container input[type="text"] { +input:focus { + border: 1px solid #4a6cd1; +} + +button { width: 100%; padding: 12px; - margin: 10px 0; - font-size: 17px; - border: 2px solid #ddd; - border-radius: 10px; - box-sizing: border-box; -} - -.index-container input[type="text"]:focus { - border-color: #4ba3ff; - box-shadow: 0 0 6px rgba(75,163,255,0.4); -} - -.index-container button { - width: 100%; - padding: 12px; - font-size: 18px; - border: none; - border-radius: 10px; - background: #4ba3ff; + margin-top: 20px; + font-size: 1rem; + background: #4a6cd1; color: white; + border: none; + border-radius: 8px; cursor: pointer; transition: 0.25s; } -.index-container button:hover { - background: #1b8af5; +button:hover { + background: #3454ad; } -/* ============================== - map4.html 用 -============================== */ -body.map-page { - background: linear-gradient(135deg, #d7efff, #e8ffef); - min-height: 100vh; - padding: 20px; - box-sizing: border-box; -} +/* =============================== + map4.html レイアウト +================================= */ -/* レイアウト */ -.map-layout { - max-width: 1200px; - margin: 0 auto; +#mapContainer { display: flex; - flex-direction: column; - gap: 20px; -} - -/* PC では横並び */ -@media (min-width: 900px) { - .map-layout { - flex-direction: row; - align-items: flex-start; - } - .map-area { - width: 70%; - } - .member-area { - width: 30%; - } -} - -/* カード */ -.card { - background: #fff; - padding: 18px; - border-radius: 18px; - box-shadow: 0 12px 30px rgba(0,0,0,0.12); -} - -/* 地図部分 */ -.map-header { - display: flex; - justify-content: space-between; - align-items: center; -} - -.map-area h1 { - margin: 0; - font-size: 24px; - color: #333; -} - -.group-label { - margin-top: 8px; - font-size: 15px; - color: #555; -} - -#map { - width: 100%; - height: 480px; - border-radius: 15px; - margin-top: 15px; - box-shadow: 0 4px 20px rgba(0,0,0,0.15); -} - -/* 退出ボタン */ -.exit-btn { - padding: 6px 14px; - background: #ff6b6b; - border: none; - color: white; - border-radius: 999px; - cursor: pointer; - font-size: 13px; - transition: 0.25s; -} -.exit-btn:hover { - background: #ff3b3b; + height: calc(100vh - 60px); } /* メンバー一覧 */ -.member-area h2 { +#sidebar { + width: 230px; + background: white; + border-right: 1px solid #ccc; + padding: 15px; + overflow-y: auto; + box-shadow: 2px 0 8px rgba(0,0,0,0.05); +} + +#sidebar h3 { margin-top: 0; - font-size: 20px; text-align: center; - color: #444; + color: #4a6cd1; } #memberList { list-style: none; - padding-left: 0; - margin: 10px 0 0; + padding: 0; + margin: 0; } #memberList li { + padding: 10px 8px; + margin: 8px 0; + background: #f7f9ff; + border-radius: 8px; + cursor: pointer; display: flex; align-items: center; - gap: 12px; - background: #f9fbff; - padding: 12px; - margin-bottom: 12px; - border-radius: 12px; - font-size: 16px; - border-left: 5px solid #4ba3ff; + gap: 8px; + transition: background 0.2s; +} + +#memberList li:hover { + background: #e6edff; +} + +/* オンライン / オフライン */ +.online { + border-left: 4px solid #4a9a3d; +} +.offline { + border-left: 4px solid #a4a4a4; +} + +/* メンバーアイコン(丸) */ +.member-icon { + width: 12px; + height: 12px; + background: #4a6cd1; + border-radius: 50%; +} + +/* =============================== + 地図 +================================= */ +#map { + flex: 1; +} + +/* =============================== + ピンデザイン(DivIcon) +================================= */ + +/* ピン名ラベル */ +.pin-label { + background: rgba(0, 0, 0, 0.7); + color: white; + font-size: 12px; + padding: 2px 6px; + border-radius: 6px; + margin-bottom: 2px; + text-align: center; + width: max-content; +} + +/* ピン画像 */ +.pin-image { + width: 35px; +} + +/* =============================== + 退出ボタン +================================= */ +#exitBtn { + width: 100%; + padding: 10px; + background: #d9534f; + color: white; + border: none; + border-radius: 8px; + margin-top: 20px; cursor: pointer; transition: 0.2s; } -#memberList li:hover { - background: #eef4ff; - transform: translateX(4px); +#exitBtn:hover { + background: #b73c38; } -/* メンバー丸アイコン */ -.member-icon { - width: 28px; - height: 28px; - border-radius: 50%; - background: linear-gradient(135deg, #6db9ff, #4a90e2); - box-shadow: 0 2px 6px rgba(0,0,0,0.2); - position: relative; +/* =============================== + アニメ削除 → 残骸を無効化 +================================= */ + +.pulse-marker { + animation: none !important; } -/* オンライン/オフラインバッジ */ -.member-icon::after { - content: ""; - position: absolute; - right: -4px; - bottom: -4px; - width: 12px; - height: 12px; - border-radius: 50%; - border: 2px solid white; +/* =============================== + スマホ向けレスポンシブ +================================= */ +@media (max-width: 768px) { + #mapContainer { + flex-direction: column; + } + + #sidebar { + width: 100%; + height: 180px; + border-right: none; + border-bottom: 1px solid #ccc; + } + + #map { + height: calc(100vh - 180px); + } } -.online .member-icon::after { - background: radial-gradient(circle, #7dff9b, #35cc62); - box-shadow: 0 0 6px rgba(69,255,125,0.5); -} - -.offline .member-icon::after { - background: #ff6b6b; -} - -/* アニメーション共通 */ -.fadeIn { - animation: fadeIn 0.6s ease-out; -} -.fadeInDelay { - animation: fadeIn 0.6s ease-out; - animation-delay: 0.25s; -} - +/* =============================== + フェードイン演出(フォーム用) +================================= */ @keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } - to { opacity: 1; transform: translateY(0); } -} - -/* ============================== - 地図ピンの安定パルスアニメーション -============================== */ -@keyframes pulseMarker { - 0% { transform: scale(1); opacity: 1; } - 30% { transform: scale(1.15); opacity: 0.92; } - 60% { transform: scale(1.05); opacity: 1; } - 100% { transform: scale(1); opacity: 1; } -} - -.pulse-marker { - animation: pulseMarker 0.5s ease-out; - transform-origin: bottom center; - will-change: transform; -} - -/* ============================== - popup 位置補正 -============================== */ -.leaflet-popup { - margin-left: 0px !important; -} - -/* Google Maps風ラベル */ -.custom-pin { - position: relative; - text-align: center; -} - -.pin-label { - background: white; - padding: 2px 6px; - border-radius: 6px; - font-size: 13px; - color: #333; - white-space: nowrap; - box-shadow: 0 2px 6px rgba(0,0,0,0.25); - transform: translateY(-6px); -} - -.pin-image { - width: 30px; - height: 45px; - display: block; - margin: 0 auto; -} - -/* ピンアニメ(パルス) */ -.pulse-marker { - animation: pulseMarker 0.5s ease-out; - transform-origin: bottom center; -} - -@keyframes pulseMarker { - 0% { transform: scale(1); opacity: 1; } - 30% { transform: scale(1.15); opacity: 0.92; } - 60% { transform: scale(1.05); opacity: 1; } - 100% { transform: scale(1); opacity: 1; } -} - -/* Google Maps風ラベル(はみ出し防止版) */ -.pin-label { - background: white; - padding: 2px 6px; - border-radius: 6px; - font-size: 13px; - color: #333; - white-space: nowrap; - max-width: 120px; /* ★ 最大幅を決める */ - overflow: hidden; /* ★ はみ出し防止 */ - text-overflow: ellipsis; /* ★ … で省略 */ - box-shadow: 0 2px 6px rgba(0,0,0,0.25); - transform: translateY(-6px); - display: inline-block; - text-align: center; -} - -/* ピン内部の要素にクリックイベントを通す */ -.custom-pin, -.custom-pin * { - pointer-events: auto !important; -} - -/* Leaflet のデフォルトを上書きして DivIcon をクリック可能に */ -.leaflet-interactive { - pointer-events: auto !important; + to { opacity: 1; transform: translateY(0); } }