:root{
  --bg:#f6fbf8;
  --fg:#17211c;
  --muted:#64746d;
  --app-header-height:42px;
  --map-panel-height:340px;
  --brand-500:#2f7d5b;
  --brand-600:#2b6f50;
  --brand-700:#1f563e;
  --line:#d6eadf;
  --surface:#ffffff;
  --surface-soft:#fbfefc;
  --status-open-bg:#d9f8e7;
  --status-open-fg:#166534;
  --status-soon-bg:#fff5d8;
  --status-soon-fg:#8a5600;
  --status-urgent-bg:#ffe5e5;
  --status-urgent-fg:#a91f16;
  --status-closed-bg:#eef2f0;
  --status-closed-fg:#667085;
}
[data-theme=light]{
  color-scheme: light;
  --color-base-100: oklch(100% 0 0);
  --color-base-200: oklch(98% 0.012 150);
  --color-base-300: oklch(93% 0.03 150);
  --color-base-content: oklch(25% 0.04 150);
  --color-primary: oklch(48% 0.11 155);
  --color-primary-content: oklch(98% 0.01 155);
  --color-secondary: oklch(72% 0.13 78);
  --color-secondary-content: oklch(24% 0.04 78);
  --color-accent: oklch(65% 0.13 345);
  --color-accent-content: oklch(98% 0.01 345);
  --color-neutral: oklch(40% 0.04 150);
  --color-neutral-content: oklch(98% 0.01 150);
  --color-info: oklch(70% 0.11 230);
  --color-info-content: oklch(20% 0.04 230);
  --color-success: oklch(62% 0.13 150);
  --color-success-content: oklch(98% 0.01 150);
  --color-warning: oklch(78% 0.16 80);
  --color-warning-content: oklch(24% 0.04 80);
  --color-error: oklch(63% 0.16 28);
  --color-error-content: oklch(98% 0.01 28);
  --radius-selector: 0.5rem;
  --radius-field: 0.375rem;
  --radius-box: 0.75rem;
  --size-selector: 0.25rem;
  --size-field: 0.25rem;
  --border: 1px;
  --depth: 0;
  --noise: 0;
}

*{box-sizing:border-box}
html{min-height:100%;overflow-x:clip}
body{min-height:100%;margin:0;overflow-x:clip;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;font-size:13px;line-height:1.35;background:var(--bg)}
.app-header{position:sticky;top:0;z-index:30;min-height:var(--app-header-height);background:linear-gradient(180deg,#ffffff,#fbfefc);box-shadow:0 1px 0 rgba(31,86,62,0.08)}

main{min-height:calc(100dvh - var(--app-header-height));display:block;overflow:visible}
.map-panel{height:var(--map-panel-height);min-height:0;background:#e9f2ed;border-bottom:1px solid var(--line);overflow:hidden;position:sticky;top:var(--app-header-height);z-index:20;display:grid;grid-template-rows:minmax(0,1fr) auto}
.map-container{width:100%;height:100%;min-height:0;touch-action:none}
.map-toolbar{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:6px 8px;position:absolute;top:0;left:0;right:0;z-index:3;background:linear-gradient(180deg,rgba(255,255,255,0.97),rgba(248,253,250,0.82));backdrop-filter:blur(12px);border-bottom:1px solid rgba(43,111,80,0.12);box-shadow:0 6px 18px rgba(31,86,62,0.08);overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}
.map-toolbar-left{display:flex;gap:5px;align-items:center;flex:0 0 auto;min-width:0}
.map-toolbar-actions{display:flex;gap:6px;align-items:center;flex:0 0 auto}
.map-label{display:none}
.map-button{gap:4px;font-size:12px;font-weight:700;line-height:1;text-transform:none}
.map-button:hover{text-decoration:none}
.map-button.active{}
.map-button.map-button-off{border-color:#d7ded9 !important;color:#8a9790 !important;background:rgba(255,255,255,0.62) !important}
.map-button.map-button-off:hover{border-color:#c8d2cc !important;color:#69776f !important;background:rgba(255,255,255,0.86) !important}
.locate-button{flex:0 0 auto}
#locateMe:disabled{opacity:.72;cursor:wait}
.map-center-crosshair{position:absolute;left:50%;top:50%;width:22px;height:22px;transform:translate(-50%,-50%);z-index:2;pointer-events:none;color:#1f6f50;filter:drop-shadow(0 1px 2px rgba(255,255,255,0.95))}
.map-center-crosshair::before,.map-center-crosshair::after{content:'';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:currentColor;border-radius:999px}
.map-center-crosshair::before{width:22px;height:2px}
.map-center-crosshair::after{width:2px;height:22px}
.map-status{padding:6px 10px;background:rgba(255,255,255,0.98);border-top:1px solid rgba(23,33,28,0.08);font-size:11px;color:#26352d;z-index:3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.error{position:absolute;top:58px;left:10px;right:10px;padding:8px 10px;background:#fff1f1;color:#a31616;border:1px solid #ffd1d1;border-radius:8px;font-size:12px;z-index:3;display:none}
.error:not(:empty){display:block}

.filter-panel{position:sticky;top:calc(var(--app-header-height) + var(--map-panel-height));z-index:19;padding:8px 10px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,rgba(255,255,255,0.98),rgba(250,254,252,0.97));box-shadow:0 4px 12px rgba(31,86,62,0.06)}
.controls{display:flex;flex-wrap:wrap;gap:6px;align-items:center;color:var(--muted)}
.control-check{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 2px;border:0;background:transparent;font-size:12px;font-weight:700;color:#5f6f68}
.control-check:has(input:checked){color:#47564f}
.control-check input{accent-color:var(--brand-600)}
.sort-wrap{display:inline-flex;align-items:center;gap:5px;height:28px;margin-left:auto;padding:0 2px;color:#5f6f68}
.sort-wrap i{color:#5f6f68}
.sort-wrap select{font-size:12px;font-weight:700;color:#5f6f68}
.chips{display:flex;gap:6px;overflow-x:auto;padding-top:7px;-webkit-overflow-scrolling:touch}
.chip{flex:0 0 auto;font-size:11px;font-weight:700;line-height:1;cursor:pointer}
.chip:hover{text-decoration:none}
.chip.badge-primary{font-weight:800}

.place-list{padding:0;margin:0;list-style:none;overflow:visible;min-height:0;max-height:none;background:var(--bg)}
.list-loading{min-height:100%;display:grid;place-content:center;justify-items:center;gap:10px;color:var(--brand-700);font-size:13px;font-weight:800}
.list-loading .loading{color:var(--brand-600)}
.list-group{list-style:none;margin:0;padding:6px 8px 0}
.list-group-collapse.collapse{border-radius:8px;background:#fff}
.list-group-title.collapse-title{display:flex;align-items:center;gap:8px;min-height:36px;padding:8px 36px 8px 10px;font-size:12px;font-weight:800;color:var(--brand-700)}
.list-group-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list-group-count.badge{margin-left:auto;font-size:10px;font-weight:800}
.list-group-body.collapse-content{padding:0}
.list-group-items{list-style:none;margin:0;padding:0}
.list-group-items .place-row:last-child{border-bottom:0}
.place-row{display:grid;grid-template-columns:82px minmax(0,1fr) auto;gap:4px 8px;padding:8px 10px;border-top:1px solid #d9e2ef;border-bottom:1px solid #d9e2ef;border-radius:0;background:#fff;color:#172033}
.place-row+.place-row{border-top:0}
.place-row:hover{background:#fbfdff}
.place-row.selected{background:#f0f9ff;border-left:4px solid #60a5fa;padding-left:6px}
.place-row.is-closed{background:#fff;color:#56616f}
.hours-col{grid-row:1 / 4;display:grid;align-content:start;gap:4px;min-width:0;padding-right:8px;border-right:1px solid rgba(217,226,239,.7)}
.today-hours{white-space:pre-line;text-align:center;font-size:10px;font-weight:700;line-height:1.25;color:#2f5f9f}
.place-row.is-closed .today-hours{color:#56616f}
.place-row .status-badge{display:inline-flex;align-items:center;justify-content:center;width:100%;height:20px;border-radius:999px;padding:0 4px;font-size:11px;font-weight:700;line-height:1;white-space:nowrap}
.place-row .status-badge.status--open{background:#16a34a;color:#fff}
.place-row .status-badge.status--closed{background:#111827;color:#fff}
.place-row .status-badge.status--permanently-closed{background:#991b1b;color:#fff}
.place-row .status-badge.status--before{border:1px solid #c9daf7;background:#e8f1ff;color:#2f5f9f}
.place-row .status-badge.status--break{border:1px solid #ead4ad;background:#fff3dc;color:#8a5a16}
.place-row .remaining-time{text-align:center;font-size:12px;font-weight:700;line-height:1;color:#64748b;white-space:nowrap}
.place-row.status--open .remaining-time{color:#15803d}
.place-row.status--before .remaining-time{color:#2f5f9f}
.place-row.status--break .remaining-time{color:#8a5a16}
.place-title-row{display:flex;align-items:center;gap:6px;min-width:0;line-height:1}
.category-badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:0;height:20px;border:1px solid transparent;border-radius:999px;padding:0 6px;font-size:10px;font-weight:800;line-height:1;white-space:nowrap}
.category--ice{border-color:#bae6fd;background:#f0f9ff;color:#0369a1}
.category--dumpling{border-color:#fde68a;background:#fffbeb;color:#b45309}
.category--soy{border-color:#a7f3d0;background:#ecfdf5;color:#047857}
.category--noodle{border-color:#fed7aa;background:#fff7ed;color:#c2410c}
.category--mee{border-color:#ddd6fe;background:#f5f3ff;color:#6d28d9}
.category--sweet{border-color:#fbcfe8;background:#fdf2f8;color:#be185d}
.category--cafe{border-color:#e7d1a6;background:#fdf8ed;color:#8a6f3f}
.category--default{border-color:#cbd5e1;background:#fbfdff;color:#475569}
.name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:800;color:#071225;letter-spacing:0}
.tags{grid-column:2 / 4;display:flex;gap:8px;flex-wrap:wrap;min-width:0;overflow:hidden;white-space:nowrap}
.tag{display:inline-flex;align-items:center;height:18px;border:1px solid #cbd5e1;border-radius:999px;background:transparent;padding:0 6px;color:#475569;font-size:10px;font-weight:700;line-height:1;white-space:nowrap}
.tag--break{border-color:#f1d19b;color:#8a5a16}
.tag--early{border-color:#bae6fd;color:#0369a1}
.tag--late{border-color:#cbd5e1;color:#475569}
.tag--tomorrow{border-color:#ad2b1f;background:#ad2b1f;color:#fff}
.place-row .meta-row{grid-column:2 / 4;display:flex;align-items:center;gap:8px;min-width:0;font-size:12px;line-height:1.25;color:#667085}
.area-station{min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list-rating{display:inline-flex;align-items:center;gap:1px;flex:0 0 auto;font-size:12px;font-weight:800;line-height:1;color:#0f1f3a;white-space:nowrap}
.rating-star{color:#f59f39}
.rating-score{color:#0f1f3a}
.distance{flex:0 0 auto;font-size:12px;font-weight:800;color:#0f1f3a;white-space:nowrap}
.external-link{display:inline-flex;align-items:center;justify-content:center;color:#50627d;text-decoration:none;font-size:20px}
.row-actions{display:flex;align-items:center;gap:6px;color:#64748b}
.row-actions .btn{border-radius:999px;font-size:20px;color:#91a0b4}
.row-actions .favorite-btn{color:#64748b}
.row-actions .external-link{border-radius:8px;color:#50627d}
[hidden]{display:none!important}

.current-location-overlay,.distance-reference-overlay{position:absolute;inset:0;pointer-events:none}
.shop-marker{--marker-bg:#f3faf6;--marker-border:#b9dfca;--marker-icon:#2f7d5b;position:relative;display:flex;align-items:center;gap:6px;min-width:104px;max-width:176px;padding:6px 9px 6px 7px;border-radius:999px;background:linear-gradient(180deg,#fff,var(--marker-bg));border:1px solid var(--marker-border);box-shadow:0 3px 10px rgba(23,33,28,.18);color:#1f2933;font-size:12px;font-weight:700;line-height:1.2;white-space:nowrap;cursor:pointer;transform:translateY(-6px);transition:transform 140ms ease,box-shadow 140ms ease,border-color 140ms ease}
.shop-marker::after{content:"";position:absolute;left:50%;bottom:-6px;width:10px;height:10px;background:var(--marker-bg);border-right:1px solid var(--marker-border);border-bottom:1px solid var(--marker-border);transform:translateX(-50%) rotate(45deg);box-shadow:3px 3px 5px rgba(23,33,28,.08)}
.shop-marker:hover,.shop-marker.is-active{transform:translateY(-10px) scale(1.06);box-shadow:0 7px 18px rgba(23,33,28,.24);border-color:var(--marker-icon);z-index:2}
.shop-icon{display:grid;place-items:center;flex:0 0 24px;width:24px;height:24px;border-radius:999px;background:#111827;color:#fff;font-size:14px}
.shop-name{display:block;min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis}
.shop-meta{display:flex;align-items:center;justify-content:flex-start;gap:4px;margin-top:1px;color:#666;font-size:10px;font-weight:700;line-height:1;min-height:12px}
.shop-status.status-badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;height:12px;border-radius:999px;padding:0 4px;font-size:9px;font-weight:800;line-height:1;white-space:nowrap}
.shop-status.status--open{background:#16a34a;color:#fff}
.shop-status.status--closed{background:#111827;color:#fff}
.shop-status.status--permanently-closed{background:#991b1b;color:#fff}
.shop-status.status--before{border:1px solid #c9daf7;background:#e8f1ff;color:#2f5f9f}
.shop-status.status--break{border:1px solid #ead4ad;background:#fff3dc;color:#8a5a16}
.shop-rating{display:inline-flex;align-items:center;gap:1px;flex:0 0 auto;font-weight:800;color:#0f1f3a}
.shop-marker.restaurant{--marker-bg:#fff7ed;--marker-border:#fed7aa;--marker-icon:#ea580c}
.shop-marker.cafe{--marker-bg:#fdf8ed;--marker-border:#e7d1a6;--marker-icon:#8a6f3f}
.shop-marker.bakery{--marker-bg:#fdf2f8;--marker-border:#fbcfe8;--marker-icon:#cf5c7c}
.shop-marker.bar{--marker-bg:#f5f3ff;--marker-border:#ddd6fe;--marker-icon:#7c3aed}
.shop-marker.default{--marker-bg:#eff6ff;--marker-border:#bfdbfe;--marker-icon:#2563eb}
.shop-marker.restaurant .shop-icon,.shop-marker.cafe .shop-icon,.shop-marker.bakery .shop-icon,.shop-marker.bar .shop-icon,.shop-marker.default .shop-icon{background:var(--marker-icon)}
.cluster-marker{position:relative;display:flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:999px;background:#f59f39;color:#fff;border:4px solid rgba(255,255,255,.95);box-shadow:0 5px 18px rgba(23,33,28,.28);font-weight:900;text-align:center;line-height:1.05;cursor:pointer}
.cluster-marker::before{content:"";position:absolute;inset:-8px;border-radius:999px;background:rgba(245,159,57,.20)}
.cluster-marker .count{position:relative;z-index:1;display:block;font-size:18px}
.cluster-marker .label{position:relative;z-index:1;display:block;margin-top:2px;font-size:10px;opacity:.95}
.cluster-marker.is-large{width:66px;height:66px}
.cluster-marker.is-large .count{font-size:21px}
.current-location-accuracy{position:absolute;transform:translate(-50%,-50%);background:rgba(26,115,232,0.12);border:1px solid rgba(26,115,232,.22);border-radius:999px;pointer-events:none}
.current-location-dot{position:absolute;transform:translate(-50%,-50%);width:18px;height:18px;border-radius:50%;background:#1a73e8;border:3px solid #fff;box-shadow:0 0 0 8px rgba(26,115,232,0.18),0 2px 9px rgba(0,0,0,0.3)}
.distance-reference-marker{position:absolute;transform:translate(-50%,-100%);width:24px;height:24px;border-radius:999px;background:#1f6f50;border:3px solid #fff;box-shadow:0 2px 8px rgba(23,33,28,0.32),0 0 0 5px rgba(31,111,80,0.18)}
.distance-reference-marker::before{content:'';position:absolute;left:50%;bottom:-9px;width:12px;height:12px;background:#1f6f50;border-right:3px solid #fff;border-bottom:3px solid #fff;transform:translateX(-50%) rotate(45deg);box-shadow:3px 3px 6px rgba(23,33,28,0.18)}
.distance-reference-marker::after{content:'';position:absolute;left:50%;top:50%;width:7px;height:7px;border-radius:999px;background:#fff;transform:translate(-50%,-50%)}

.modal-overlay{position:fixed;inset:0;background:rgba(11,15,12,0.32);display:flex;align-items:flex-end;justify-content:center;padding:12px 10px;z-index:60;overflow:hidden}
.modal-card{position:relative;background:linear-gradient(180deg,#fff,#fbfefc);border-radius:18px;width:min(720px, calc(100vw - 20px));min-width:0;min-height:72vh;max-height:calc(100dvh - 24px);box-shadow:0 18px 38px rgba(23,33,28,0.20);padding:42px 14px 14px;border:1px solid rgba(43,111,80,0.16);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.modal-card.modal-destination{width:min(520px, calc(100vw - 20px));min-width:0;min-height:48vh;text-align:center}
.modal-close-x{position:absolute;top:10px;right:10px;z-index:2;color:var(--brand-700)}
.modal-close-x:hover{background:#f3faf6}
.modal-header{display:flex;flex-direction:column;gap:8px}
.top-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.header-actions{display:flex;gap:6px}
.icon-btn{background:#fff;border:1px solid var(--line);width:32px;height:32px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;font-size:13px;color:var(--brand-600);cursor:pointer;box-shadow:0 1px 3px rgba(31,86,62,0.06)}
.status-row{display:flex;gap:6px;align-items:center}
.category-row,.subtitle-row,.meta-row{font-size:12px;color:var(--muted)}
.place-name{font-size:18px;margin:0;font-weight:900;color:var(--brand-700);line-height:1.25}
.tag-line{display:flex;flex-wrap:wrap;gap:5px}
.tag-line .tag{color:var(--brand-700)}
.detail-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,0.85fr);gap:10px;margin-top:10px;min-width:0}
.detail-column{display:flex;flex-direction:column;gap:10px;min-width:0}
.section-card{background:rgba(251,254,252,0.96);border:1px solid var(--line);border-radius:12px;padding:10px;display:flex;flex-direction:column;gap:8px;box-shadow:0 1px 2px rgba(31,86,62,0.04);min-width:0}
.section-heading{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:900;color:var(--brand-700)}
.section-body{display:flex;flex-direction:column;gap:8px}
.location-card .location-area{font-weight:900;color:var(--brand-700)}
.location-address{color:var(--muted)}
.address-button{gap:6px;font-size:12px;font-weight:700;text-transform:none}
.field-label{color:var(--muted);font-size:11px}
.field-value{font-weight:800;color:var(--brand-700);text-decoration:none}
.info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.info-item{display:flex;flex-direction:column;gap:3px}
.hours-table{width:100%;border-collapse:collapse;font-size:12px}
.hours-table td{padding:6px 7px}
.hours-table tr.today-row td{background:#e3f3ea;color:var(--brand-700);font-weight:900}
.hours-table tr.closed td{color:#b42318;font-weight:800}
.reference-list{display:flex;flex-direction:column;gap:6px}
.reference-list a{display:flex;justify-content:space-between;align-items:center;gap:8px;min-width:0;padding:7px 8px;border-radius:10px;border:1px solid var(--line);background:#fff;color:var(--brand-700);text-decoration:none;font-size:12px;font-weight:800;overflow-wrap:anywhere;word-break:break-word}
.reference-list a::after{content:'\f35d';font-family:"Font Awesome 6 Free";font-weight:900;font-size:10px;opacity:.7;flex:0 0 auto}
.note{font-size:12px;color:var(--muted);white-space:pre-wrap}
.modal-actions{display:flex;justify-content:flex-end;margin-top:10px}
.btn-close{font-size:12px;font-weight:700;color:var(--brand-700);text-transform:none}
.dest-address{font-size:18px;font-weight:900;color:#111;margin:10px 0}
.dest-name{font-size:13px;color:var(--muted);margin-bottom:8px}
.dest-phone{font-size:15px;color:var(--brand-700);font-weight:800}

@media (max-width:720px){
  .modal-overlay{align-items:flex-start;padding:calc(env(safe-area-inset-top, 0px) + 8px) 8px 8px}
  .modal-card{width:100%;max-width:calc(100vw - 16px);max-height:calc(100dvh - env(safe-area-inset-top, 0px) - 16px);min-height:0;border-radius:14px}
  .detail-grid{grid-template-columns:minmax(0,1fr)}
}
.map-button.btn{min-height:28px;height:28px;text-transform:none}
.control-check .checkbox{width:18px;height:18px;min-height:18px;border-radius:6px;background:#fff;border-color:#cfd8d3;--chkbg:#fff;--chkfg:#17211c}
.sort-wrap .select{
  min-height:28px;
  height:28px;
  padding:0 22px 0 0;
  border:0;
  background-color:transparent;
  box-shadow:none;
  outline:0;
  font-size:12px;
  font-weight:700;
  color:#5f6f68;
}
.sort-wrap .select:is(:hover,:focus,:focus-visible){
  border:0;
  background-color:transparent;
  box-shadow:none;
  outline:0;
  color:#5f6f68;
}
.sort-wrap .select option{
  background-color:#fff;
  color:#17211c;
}
.icon-btn.btn{min-height:32px;height:32px;padding:0}
.address-button.btn{min-height:28px;height:28px;text-transform:none}
.btn-close.btn{min-height:30px;height:30px;padding:7px 10px;text-transform:none}
.modal-overlay.modal{background:rgba(11,15,12,0.32)}
.modal-card.modal-box{width:min(720px, calc(100vw - 20px));max-width:calc(100vw - 20px);padding:42px 14px 14px}
.modal-card.modal-box.modal-destination{width:min(520px, calc(100vw - 20px));max-width:calc(100vw - 20px)}
.modal-close-x.btn{min-height:32px;height:32px;width:32px;padding:0;border-color:var(--line);background:#fff;font-size:18px;font-weight:700;box-shadow:0 1px 3px rgba(31,86,62,0.08)}
.modal-close-x.btn:hover{background:#f3faf6}

.control-check .checkbox:checked{background:#fff;border-color:#cfd8d3;color:#17211c}
.control-check .checkbox:focus-visible{outline:2px solid #c7e5d4;outline-offset:2px}

@media (max-width:720px){
  .modal-card.modal-box{width:100%;max-width:calc(100vw - 16px)}
  .modal-card.modal-box.modal-destination{width:100%;max-width:calc(100vw - 16px)}
  .map-toolbar{align-items:center}
  .map-toolbar-actions{justify-content:flex-start}
}
