diff --git a/fes.css b/fes.css index 9b8b5e4..28f0cc3 100644 --- a/fes.css +++ b/fes.css @@ -1,156 +1,175 @@ -/* style.css - 縦長表示版(左揃え修正版) */ - -/* 基本 */ -* { box-sizing: border-box; } -html, body { height: 100%; margin: 0; padding: 0; } -body { - display: flex; - flex-direction: column; - min-height: 100vh; - font-family: "Hiragino Sans","Helvetica Neue",Arial,sans-serif; - -webkit-font-smoothing: antialiased; - background: linear-gradient(135deg,#a8edea,#fed6e3); - color: #222; +/* ページ全体 */ +html, body { + margin: 0; + padding: 0; + font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", sans-serif; + background: #fffafc; /* 青春っぽい淡い背景 */ + color: #333; + /* overflow: hidden; ←これを削除して、サイトをスクロール可能に */ } -/* ヘッダー(上部) */ -.site-header { - padding: 12px 16px; +/* マップコンテナ */ +#map { + position: relative; + width: 100%; + /* 高さはコンテンツ依存にする。100vh固定しない */ + background: #fdfdff; + overflow: visible; /* ← マップ外も見えるようにする */ + margin: 0 auto; text-align: center; - background: linear-gradient(90deg,#6a85b6,#bac8e0); - color: #fff; - box-shadow: 0 2px 6px rgba(0,0,0,0.12); - z-index: 50; } -.site-header h1 { margin: 0; font-size: 1.15rem; } -.site-header .sub { margin-top: 4px; font-size: 0.85rem; opacity: .95; } -/* タブ */ -.tabs { +/* マップ画像(縦長基準) */ +#mapImage { + height: 100vh; /* 画面の高さにフィット */ + width: auto; /* 横幅は自動調整 */ + display: block; + margin: 0 auto; /* 中央寄せ */ + touch-action: none; /* Panzoom用 */ +} + +/* ピン */ +.pin { + position: absolute; + transform: translate(-50%, -100%); + cursor: pointer; + z-index: 10; +} +.pin img { + width: 32px; + height: 32px; +} + +/* 吹き出し(カード風) */ +.tooltip { + position: absolute; + transform: translate(-50%, -120%); + z-index: 20; + display: none; +} +.tooltip-card { + background: #fff; + border-radius: 12px; + box-shadow: 0 6px 20px rgba(0,0,0,0.25); + padding: 12px; + width: 240px; + text-align: left; + animation: fadeIn 0.25s ease; +} +.tooltip-header { + font-weight: bold; + font-size: 1.1em; + margin-bottom: 8px; + color: #2c3e50; +} +.tooltip-body { display: flex; gap: 8px; - padding: 8px; +} +.tooltip-thumb { + width: 72px; + height: 72px; + object-fit: cover; + border-radius: 8px; +} +.desc { + font-size: 0.9em; + color: #555; +} +.close-btn { + float: right; + border: none; + background: none; + font-size: 1.2em; + cursor: pointer; + color: #888; +} + +/* タブ */ +.tab-container { + display: flex; justify-content: center; + margin: 8px 0; } .tab-button { flex: 1; - max-width: 220px; - padding: 10px 12px; + padding: 10px; border: none; - border-radius: 10px; - background: rgba(255,255,255,0.95); - font-size: 1rem; + background: #e0f0ff; + font-size: 1em; cursor: pointer; - box-shadow: 0 2px 6px rgba(0,0,0,0.08); } .tab-button.active { - background: linear-gradient(90deg,#ff9a9e,#fad0c4); - color: #fff; - font-weight: 700; + background: #87cefa; + color: white; + font-weight: bold; } -/* メイン領域 */ -.main { - flex: 1 1 auto; +/* 一覧パネル */ +.list-toggle { + position: fixed; + bottom: 20px; + right: 20px; + background: #ff69b4; + color: white; + border: none; + border-radius: 50%; + width: 56px; + height: 56px; + font-size: 1.5em; + box-shadow: 0 4px 10px rgba(0,0,0,0.3); + z-index: 30; +} +.list-panel { + position: fixed; + bottom: 0; + left: 0; + right: 0; + max-height: 70%; + background: white; + border-top-left-radius: 16px; + border-top-right-radius: 16px; + box-shadow: 0 -4px 20px rgba(0,0,0,0.25); + transform: translateY(100%); + transition: transform 0.3s ease; + z-index: 40; + overflow-y: auto; +} +.list-panel.open { + transform: translateY(0); +} +.shop-item { display: flex; - align-items: flex-start; /* 上寄せにしておく(縦が余る場合の見た目) */ - justify-content: center; - padding: 8px; + padding: 10px; + border-bottom: 1px solid #eee; } - -/* ここが重要:ラッパを左揃えに変更(中央寄せ -> 左寄せ) */ -/* justify-content: flex-start にすることで、マップの左端が常に表示される */ -.map-wrapper { - width: 100%; - height: calc(100vh - 96px); /* ヘッダー+タブの高さの目安 */ - display: flex; - align-items: center; - justify-content: flex-start; /* ← 左揃え */ - overflow: hidden; /* 左端を常に見せるため外溢れを隠す */ - touch-action: none; - padding-left: 0; /* 必要なら微調整で余白を入れる */ +.shop-thumb { + width: 64px; + height: 64px; + border-radius: 8px; + object-fit: cover; + margin-right: 8px; } - -/* マップ本体(幅は画像に合わせ auto、height 基準でフィット) */ -.map-container { - display: inline-block; /* 画像の自然幅に合わせる(JSの座標計算と一致) */ - position: relative; - height: 100%; - border-radius: 14px; - overflow: visible; - border: 3px solid rgba(255,255,255,0.9); - box-shadow: 0 8px 24px rgba(0,0,0,0.18); - background: #fff; - margin-left: 0; /* 明示的に左寄せ */ +.shop-meta { + flex: 1; } - -/* 画像は高さ基準(縦長ファースト) */ -.map-container img#mapImage { - height: 100%; - width: auto; +.shop-title { + font-weight: bold; + margin: 0 0 4px; +} +.shop-desc { + margin: 0; + font-size: 0.9em; + color: #666; +} +#closeList { display: block; - user-select: none; - -webkit-user-drag: none; - pointer-events: none; + margin: 10px auto; + padding: 6px 14px; + background: #ff69b4; + color: white; + border: none; + border-radius: 8px; + font-size: 0.9em; + cursor: pointer; } - -/* ピン・吹き出しは以前のスタイルを維持 */ -.pin { - position: absolute; - width: 44px; - height: 44px; - transform: translate(-50%, -100%); - touch-action: manipulation; - z-index: 6; - transition: transform .14s ease; - -webkit-tap-highlight-color: transparent; -} -.pin:active, .pin:focus { transform: translate(-50%, -100%) scale(.98); } -.pin img { width: 100%; height: 100%; display: block; pointer-events: none; } - -/* 吹き出しカード */ -.tooltip { - position: absolute; - z-index: 8; - transform: translate(-50%, -120%); - display: none; - min-width: 200px; - max-width: 86vw; - border-radius: 12px; - box-shadow: 0 10px 28px rgba(0,0,0,.20); - background: #fff; - overflow: hidden; - animation: tooltipFade .22s ease; -} -@keyframes tooltipFade { from { opacity:0; transform: translate(-50%,-125%) scale(.98);} to { opacity:1; transform: translate(-50%,-120%) scale(1);} } - -.tooltip-card { display:block; position:relative; } -.tooltip-header { background: linear-gradient(90deg,#ff9a9e,#fad0c4); color:#fff; padding:10px 12px; font-weight:700; font-size:1rem; text-align:left; } -.tooltip-body { padding:10px 12px; text-align:left; font-size:0.95rem; color:#333; } -.tooltip-body img { width:100%; border-radius:8px; display:block; margin-top:8px; } -.tooltip-body p { margin:6px 0 0; line-height:1.4; } - -.tooltip .close-btn { - position:absolute; right:8px; top:8px; background: rgba(255,255,255,0.9); border:none; width:34px; height:34px; border-radius:50%; font-size:16px; cursor:pointer; z-index:12; box-shadow:0 2px 6px rgba(0,0,0,0.12); -} - -/* 一覧ボタン(下)とパネルは同じ挙動 */ -.list-toggle { position: fixed; right: 12px; bottom: 12px; z-index:60; background: linear-gradient(90deg,#6a85b6,#bac8e0); color:#fff; border:none; padding:12px 14px; border-radius:999px; box-shadow:0 8px 20px rgba(0,0,0,0.22); font-weight:700; cursor:pointer; } -.list-panel { position: fixed; left:0; right:0; bottom:0; z-index:70; background:#fff; border-top-left-radius:14px; border-top-right-radius:14px; box-shadow:0 -8px 30px rgba(0,0,0,0.22); transform: translateY(110%); transition: transform .28s cubic-bezier(.2,.9,.2,1); max-height:70vh; display:flex; flex-direction:column; } -.list-panel.open { transform: translateY(0); } -.list-panel-header { display:flex; align-items:center; justify-content:space-between; padding:12px; border-bottom:1px solid #eee;} -.list-content { overflow:auto; padding:8px 12px 24px; } - -.shop-item { display:flex; gap:10px; padding:10px; border-radius:10px; align-items:center; cursor:pointer; transition: background .12s ease; } -.shop-item:hover { background: rgba(220,235,255,0.6); } -.shop-thumb { width:64px; height:64px; border-radius:8px; object-fit:cover; flex:0 0 64px; } -.shop-meta { text-align:left; flex:1; } -.shop-title { font-weight:700; margin:0; font-size:0.98rem; } -.shop-desc { margin:6px 0 0; font-size:0.9rem; color:#555; } - -@media (min-width:520px) { - .pin { width:48px; height:48px; } - .tooltip { min-width:220px; } - .map-wrapper { height: calc(100vh - 120px); } -} -.hidden { display:none !important; }