/* ===== ノミドコ 固有スタイル（夜の二次会らしい紫〜ピンクのトーン） ===== */
:root{
  --brand-g1:#5a2bc7; --brand-g2:#b51f61; --brand-g3:#9a5700;
  --accent:#5a2bc7; --accent-soft:#efe9ff;
}
@media (prefers-color-scheme: dark){
  :root{ --accent:#a98bff; --accent-soft:#241c3a; }
}
html,body{ height:100%; }
body{ display:flex; flex-direction:column; height:100vh; height:100dvh; overflow:hidden; }
header.app-head{ padding:8px 14px; border-bottom:1px solid var(--rule); background:var(--panel); z-index:600; flex:none; }
.app-summary{ margin:0; color:var(--ink-mid); font-size:12px; line-height:1.5; }
.controls{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:8px; }
.seg{ display:inline-flex; border:1px solid var(--rule); border-radius:999px; overflow:hidden; }
.seg button{ font:inherit; font-size:12.5px; min-height:44px; padding:7px 12px; border:none; background:transparent; color:var(--ink-mid); cursor:pointer; }
.seg button[aria-pressed="true"]{ background:var(--accent); color:#fff; font-weight:700; }
#viewToggle{ display:none; }
.cta{ font:inherit; font-size:14px; font-weight:800; min-height:44px; padding:9px 18px; border:none; border-radius:999px; color:#fff;
  background:linear-gradient(92deg,var(--brand-g1),var(--brand-g2)); cursor:pointer;
  box-shadow:0 4px 16px rgba(123,75,255,.32); transition:transform .12s, box-shadow .12s; }
.cta:hover{ transform:translateY(-1px); box-shadow:0 8px 22px rgba(255,79,154,.34); }
.cta:disabled{ opacity:.6; cursor:default; transform:none; }
.lim{ font:inherit; font-size:12.5px; min-height:44px; padding:7px 11px; border-radius:999px; border:1.5px solid var(--rule);
  background:transparent; color:var(--ink-mid); cursor:pointer; font-weight:600; }
.lim[aria-pressed="true"]{ border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.sortsel,.search{ font:inherit; font-size:12.5px; min-height:44px; padding:7px 11px; border-radius:999px;
  border:1.5px solid var(--rule); background:var(--panel); color:var(--ink); }
.sortsel:focus-visible,.search:focus-visible{ outline:3px solid var(--accent); outline-offset:3px; }
.search{ min-width:170px; }
.count{ font-size:11.5px; color:var(--ink-soft); margin-left:auto; font-variant-numeric:tabular-nums; }
.cta-mobile,.filter-mobile{ display:none; }
.filter-toggle{ white-space:nowrap; }
#filterBadge{ display:none; min-width:17px; padding:1px 5px; margin-left:2px; border-radius:999px;
  background:var(--accent); color:#fff; font-size:10px; line-height:1.4; }
#filterBadge.on{ display:inline-block; }
#filterPanel{ margin-top:8px; }
#filterPanel.hidden{ display:none; }
.mobile-filter-head{ display:none; }
.mobile-results-action{ display:none; }
.frow{ display:flex; align-items:flex-start; gap:8px; padding:4px 0; border-top:1px dashed var(--rule-soft); }
.frow:first-child{ border-top:none; }
.flabel{ font-size:11px; color:var(--ink-soft); min-width:48px; padding-top:8px; flex:none; }
.frow .controls{ margin-top:0; flex:1; min-width:0; }

@media (min-width:1100px){
  #filterPanel:not(.hidden){ display:grid; grid-template-columns:1.08fr 1fr 1fr; align-items:start; gap:0; }
  #filterPanel .frow{ min-width:0; border-top:0; border-left:1px dashed var(--rule-soft); padding:3px 10px; }
  #filterPanel .mobile-filter-head + .frow{ border-left:0; padding-left:0; }
  #filterPanel .frow:last-child{ padding-right:0; }
  #filterPanel .flabel{ min-width:42px; }
  #filterPanel .lim,#filterPanel .sortsel,#filterPanel .search{ min-height:40px; }
}

.app{ flex:1; display:flex; min-height:0; }
aside{ width:400px; flex:none; background:var(--panel); border-right:1px solid var(--rule); overflow-y:auto; overscroll-behavior:contain; }
#map{ flex:1; min-width:0; background:var(--ground); }
.mapwrap{ position:relative; flex:1; display:flex; min-width:0; }
/* 「この辺りを検索」（地図の上部中央・Googleマップ風） */
#areaSearch{ position:absolute; left:50%; transform:translateX(-50%); top:14px; z-index:800;
  min-height:44px; border:none; border-radius:999px; padding:9px 18px; font:inherit; font-size:13px; font-weight:800;
  color:#fff; background:linear-gradient(92deg,var(--brand-g1),var(--brand-g2));
  box-shadow:0 4px 16px rgba(0,0,0,.25); cursor:pointer; }
#areaSearch:hover{ filter:brightness(1.05); }
#areaClear{ position:absolute; left:50%; transform:translateX(-50%); top:14px; z-index:800;
  min-height:44px; border:1.5px solid var(--rule); border-radius:999px; padding:8px 16px; font:inherit; font-size:12.5px; font-weight:700;
  color:var(--ink-mid); background:var(--panel); box-shadow:0 3px 12px rgba(0,0,0,.18); cursor:pointer; }
.search-ping{ position:absolute; width:22px; height:22px; margin:-11px 0 0 -11px; border-radius:50%;
  background:rgba(123,75,255,.4); pointer-events:none; z-index:850; animation:searchPing .85s ease-out forwards; }
@keyframes searchPing{ 0%{ transform:scale(.4); opacity:.85 } 100%{ transform:scale(6.5); opacity:0 } }
.map-toast{ position:absolute; left:50%; bottom:22px; transform:translateX(-50%); z-index:900;
  background:rgba(30,20,45,.88); color:#fff; font-size:13px; font-weight:700; padding:9px 18px;
  border-radius:999px; box-shadow:0 6px 20px rgba(0,0,0,.32); pointer-events:none;
  opacity:0; transition:opacity .3s; white-space:nowrap; }
.map-toast.show{ opacity:1; }
.count.results-updated{ animation:resultsCountPulse .6s ease; border-radius:999px; }
#filterToggle.results-updated{ color:#fff; border-color:#176b42; background:#176b42; }
@keyframes resultsCountPulse{
  35%{ color:#176b42; background:#e3f5ea; box-shadow:0 0 0 5px #e3f5ea; }
}
@media (prefers-reduced-motion:reduce){
  .count.results-updated{ transition:none; animation:none; }
}
.empty{ padding:26px 18px; color:var(--ink-soft); font-size:13px; line-height:1.8; }

/* 店カード */
.shop{ background:var(--panel); border:1px solid var(--rule-soft); border-left:5px solid var(--accent);
  border-radius:12px; margin:8px 10px; padding:12px 13px; position:relative;
  box-shadow:0 1px 5px rgba(30,20,10,.05); transition:transform .13s, box-shadow .13s; }
.shop:hover{ transform:translateY(-2px); box-shadow:0 6px 18px rgba(30,20,10,.10); }
.shop[aria-current="true"]{ background:var(--accent-soft); border-left-width:7px; }
.shop-focus{ display:block; width:100%; min-height:44px; border:0; padding:7px 0; background:transparent; color:var(--ink);
  font:inherit; font-size:14.5px; font-weight:800; line-height:1.45; text-align:left; cursor:pointer; }
.shop-focus:hover{ color:var(--accent); }
.shop-focus:focus-visible{ outline:3px solid var(--accent); outline-offset:3px; border-radius:3px; }
.shop .meta{ font-size:11.5px; color:var(--ink-soft); display:flex; flex-wrap:wrap; gap:7px; align-items:center; margin-top:3px; }
.shop .dist{ font-size:11px; font-weight:800; color:var(--accent); }
.shop .tags{ display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.tag{ font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:999px; background:var(--calm-bg); color:var(--calm); }
.tag.on{ background:#efe9ff; color:#6a3ae0; }
.tag.open{ background:#e3f5ea; color:#176b42; }
.tag.closed{ background:var(--urgent-bg); color:var(--urgent); }
.tag.budget{ background:#fff2df; color:#754400; }
.shop .links{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:8px; }
.shop .links a{ min-height:44px; display:inline-flex; align-items:center; font-size:11.5px; font-weight:700; color:var(--accent); text-decoration:none; }
.shop .links a:hover{ text-decoration:underline; }
.shop .hours{ font-size:11px; color:var(--ink-soft); margin-top:5px; line-height:1.6; }
.shop .place{ font-size:11px; color:var(--ink-mid); margin-top:5px; line-height:1.55; overflow-wrap:anywhere; }
.shop-photo{ width:100%; height:112px; margin:7px 0 2px; object-fit:cover; border-radius:9px; background:var(--ground); }
.shop .share-ic{ font:inherit; font-size:16px; line-height:1; border:none; background:var(--accent-soft);
  color:var(--accent); width:44px; height:44px; border-radius:999px; cursor:pointer; margin-left:auto;
  display:inline-flex; align-items:center; justify-content:center; flex:none; }
.shop .share-ic:hover{ background:var(--accent); color:#fff; }

/* 現在地（Googleマップ風） */
.me-icon{ position:relative; }
.me-icon .me-dot{ position:absolute; left:50%; top:50%; width:14px; height:14px; margin:-7px 0 0 -7px;
  background:#4285F4; border:2.5px solid #fff; border-radius:50%; box-shadow:0 1px 4px rgba(0,0,0,.35); }
.me-icon .me-pulse{ position:absolute; left:50%; top:50%; width:14px; height:14px; margin:-7px 0 0 -7px;
  background:rgba(66,133,244,.45); border-radius:50%; animation:mePulse 2s ease-out infinite; }
@keyframes mePulse{ 0%{ transform:scale(1); opacity:.7 } 70%{ transform:scale(3.2); opacity:0 } 100%{ opacity:0 } }

.leaflet-popup-content{ font-family:inherit; margin:12px 14px; }
.pop h3{ margin:0 0 6px; font-size:14px; }
.pop .meta{ font-size:12px; color:#666; margin:0 0 6px; }
.pop .place{ font-size:11.5px; color:#555; line-height:1.5; margin:5px 0; }
.pop .links{ display:flex; flex-wrap:wrap; align-items:center; gap:0 12px; }
.pop a{ color:#5a2bc7; text-decoration:none; min-height:44px; display:inline-flex; align-items:center; font-size:12px; font-weight:700; }
.pop .share-ic{ width:40px; height:40px; border:0; border-radius:999px; background:#efe9ff; color:#5a2bc7;
  font-size:15px; cursor:pointer; }

#mapFab{ display:none; position:fixed; right:14px; bottom:18px; z-index:900; border:none; border-radius:999px;
  min-height:44px; padding:12px 18px; font:inherit; font-weight:800; font-size:13.5px; color:#fff;
  background:linear-gradient(92deg,var(--brand-g1),var(--brand-g2)); box-shadow:0 6px 20px rgba(123,75,255,.35); cursor:pointer; }

@media (max-width:820px){
  body.home-page{ width:100%; max-width:100vw; overflow-x:hidden; }
  body.home-page .site-nav{ min-height:49px; padding:4px 9px; gap:7px; flex-wrap:nowrap; }
  body.home-page .site-nav .brand{ min-height:40px; font-size:15px; white-space:nowrap; }
  body.home-page .site-nav .brand small{ display:none; }
  body.home-page .site-nav .navlink{ display:none; }
  body.home-page .site-nav .spacer{ min-width:0; }
  body.home-page .site-nav .nomidoco-share-btn{ width:36px; height:36px; min-height:36px; border-radius:11px; }
  header.app-head{ width:100%; max-width:100vw; min-width:0; padding:6px 9px; overflow-x:hidden; }
  .app-summary{ display:none; }
  .controls.topbar{ display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:6px; margin-top:0; }
  #viewToggle{ display:inline-flex; grid-column:1; }
  #viewToggle button{ min-height:40px; padding:5px 8px; font-size:11.5px; }
  #goNow{ grid-column:2; width:100%; min-width:0; min-height:40px; padding:7px 10px; white-space:nowrap; }
  #filterToggle{ grid-column:3; min-height:40px; padding:5px 9px; }
  .cta-wide,.filter-wide{ display:none; }
  .cta-mobile,.filter-mobile{ display:inline; }
  .count{ grid-column:1 / -1; margin:0; min-width:0; height:15px; text-align:right;
    font-size:10.5px; white-space:nowrap; overflow:hidden; }
  .partybar{ width:100%; min-width:0; margin-top:4px; gap:5px; display:grid; grid-template-columns:auto minmax(0,1fr); }
  .party-pick{ gap:4px; }
  .pb-step{ width:40px; height:40px; }
  .pb-lead:last-child{ display:none; }
  .forecast{ min-width:0; max-width:100%; padding:5px 8px; overflow:hidden; }
  .fc-head{ display:block; min-width:0; }
  .fc-badge,.fc-when{ display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .fc-badge{ font-size:11.5px; }
  .fc-when{ font-size:10px; }
  .fc-advice,.fc-note{ display:none; }
  #filterPanel:not(.hidden){ position:fixed; left:0; right:0; top:var(--filter-panel-top,0px); bottom:0;
    z-index:1000; margin:0; padding:10px 12px calc(88px + env(safe-area-inset-bottom)); max-height:none;
    overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch;
    touch-action:pan-y; background:var(--panel); border-top:1px solid var(--rule);
    box-shadow:0 -2px 20px rgba(0,0,0,.12); }
  .mobile-filter-head{ display:flex; align-items:center; justify-content:space-between; padding:0 0 8px; }
  .mobile-filter-head b{ font-size:13px; }
  .mobile-filter-head .lim{ min-height:36px; padding:4px 11px; }
  .mobile-results-action{ display:block; position:fixed; left:12px; right:12px; bottom:0; z-index:1002;
    margin:0; padding:10px 0 max(10px,env(safe-area-inset-bottom)); background:var(--panel); }
  .mobile-results-action button{ width:100%; min-height:50px; border:0; border-radius:12px;
    color:#fff; background:linear-gradient(92deg,var(--brand-g1),var(--brand-g2));
    font:inherit; font-size:13.5px; font-weight:800; box-shadow:0 5px 16px rgba(0,0,0,.2);
    cursor:pointer; transition:background .18s,box-shadow .18s,transform .18s; }
  .mobile-results-action button.results-updated{ background:#176b42;
    box-shadow:0 6px 18px rgba(23,107,66,.35); transform:translateY(-1px); }
  .frow{ padding:8px 0; }
  .flabel{ min-width:54px; }
  .frow .controls{ gap:7px; }
  .sortsel,.search{ width:100%; }
  #mapFab{ display:none; }
  body.view-list #mapFab{ display:block; }
  body.filter-open #mapFab{ display:none; }
  aside{ width:auto; border-right:none; flex:1; }
  #map{ width:100%; flex:1; }
  .mapwrap{ width:100%; flex:1; }
  body.view-list .mapwrap{ display:none; }
  body.view-map aside{ display:none; }
  body.view-list #list{ padding-bottom:82px; }
}

/* ===== 今から◯名の候補 ＋ 混みやすさの一般傾向 ===== */
.partybar{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:8px; }
.party-pick{ display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--ink-mid); font-weight:700; flex:none; }
.pb-lead{ color:var(--ink-soft); font-weight:600; }
.pb-step{ width:44px; height:44px; border-radius:999px; border:1.5px solid var(--rule); background:var(--panel);
  color:var(--accent); font-size:18px; font-weight:800; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.pb-step:active{ transform:scale(.94); }
.pb-num{ min-width:44px; text-align:center; font-size:13px; }
.pb-num b{ font-size:18px; color:var(--accent); }

.forecast{ flex:1; min-width:200px; border:1.5px solid var(--rule); border-radius:12px; padding:8px 12px; background:var(--panel); }
.forecast.fc-ok{   background:#e8f7ef; border-color:#b7e4cd; }
.forecast.fc-mid{  background:#fff5e0; border-color:#f2dca8; }
.forecast.fc-busy{ background:#fdeceb; border-color:#f6cbc6; }
.fc-head{ display:flex; flex-wrap:wrap; align-items:baseline; gap:8px; }
.fc-badge{ font-size:13px; font-weight:800; }
.fc-ok .fc-badge{ color:#176b42; } .fc-mid .fc-badge{ color:#754400; } .fc-busy .fc-badge{ color:#98271d; }
.fc-when{ font-size:11px; color:var(--ink-soft); font-weight:700; }
.fc-advice{ font-size:12px; color:var(--ink-mid); margin-top:2px; line-height:1.5; }
.fc-note{ font-size:10px; color:var(--ink-soft); margin-top:3px; line-height:1.4; }
@media (prefers-color-scheme: dark){
  .forecast.fc-ok{   background:#12301f; border-color:#1f5738; }
  .forecast.fc-mid{  background:#332611; border-color:#5e4718; }
  .forecast.fc-busy{ background:#331815; border-color:#5e2b25; }
  .fc-ok .fc-badge{ color:#5fd398; } .fc-mid .fc-badge{ color:#e3b45f; } .fc-busy .fc-badge{ color:#f0897d; }
}
/* 人数フィット */
.tag.party-ok{ background:#e3f5ea; color:#176b42; }
.tag.party-tight{ background:#fff2df; color:#754400; }
@media (prefers-color-scheme: dark){
  .tag.party-ok{ background:#173a27; color:#5fd398; }
  .tag.party-tight{ background:#332611; color:#e3b45f; }
}
.tag.rating{ background:#fff6df; color:#a2660f; }
@media (prefers-color-scheme: dark){ .tag.rating{ background:#33290f; color:#e3b45f; } }
.source-note{ margin:8px 10px; padding:10px 12px; border:1px solid var(--rule); border-radius:10px;
  background:var(--panel); color:var(--ink-mid); font-size:11.5px; line-height:1.6; }
.source-note a{ color:var(--accent); font-weight:700; }
.sr-only{ position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important;
  overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.doc-page{ height:auto; min-height:100%; overflow:visible; display:block; }

/* 上のモバイル指定より後に定義される人数・予想部品へ、スマホ用寸法を確実に適用する。 */
@media (max-width:820px){
  .partybar{ width:100%; min-width:0; margin-top:4px; gap:5px; display:grid; grid-template-columns:auto minmax(0,1fr); }
  .party-pick{ gap:4px; }
  .pb-step{ width:40px; height:40px; }
  .pb-lead:last-child{ display:none; }
  .forecast{ min-width:0; max-width:100%; padding:5px 8px; overflow:hidden; }
  .fc-head{ display:block; min-width:0; }
  .fc-badge,.fc-when{ display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .fc-badge{ font-size:11.5px; }
  .fc-when{ font-size:10px; }
  .fc-advice,.fc-note{ display:none; }
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ scroll-behavior:auto!important; animation-duration:.01ms!important;
    animation-iteration-count:1!important; transition-duration:.01ms!important; }
}
