/* Theme list in the map's recommendation panel (おすすめルート › テーマから選ぶ). */
.at-theme-gallery{margin-top:28px;padding:18px 20px 32px;border-top:1px solid #ddd;scroll-margin-top:84px}
.at-theme-gallery h3{margin:0 0 4px;font-size:14px;font-weight:600}
.at-theme-gallery h4{margin:16px 0 4px;font-size:11px;font-weight:400;color:#777;letter-spacing:.02em}
.at-theme-gallery ul{list-style:none;margin:0;padding:0}
.at-theme-gallery li{display:flex;align-items:center;gap:8px;border-bottom:1px solid #e6e6e2}
.at-theme-gallery button{flex:1;display:flex;align-items:center;gap:12px;min-width:0;padding:10px 0;border:0;border-radius:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.at-theme-gallery img{flex:none;display:block;width:64px;height:64px;object-fit:cover;background:#e7e5df}
.at-theme-gallery span{min-width:0}
.at-theme-gallery strong{display:block;font-size:13px;font-weight:600;line-height:1.4}
.at-theme-gallery small{display:block;font-size:12px;line-height:1.45;color:#555}
.at-theme-gallery em{display:block;margin-top:2px;font-size:11px;font-style:normal;color:#888}
.at-theme-gallery a{flex:none;padding:8px 0 8px 4px;font-size:12px;color:#555;text-decoration:none;white-space:nowrap}
.at-theme-gallery button:hover strong,.at-theme-gallery a:hover{text-decoration:underline}
.at-theme-gallery button:focus-visible,.at-theme-gallery a:focus-visible{outline:2px solid #496858;outline-offset:2px}
.at-theme-gallery li:has(button[aria-pressed="true"]){margin:0 -10px;padding:0 10px;background:rgba(73,104,88,.09);box-shadow:inset 3px 0 0 #496858}
.at-theme-gallery button[aria-pressed="true"] strong::after{content:" ✓";color:#496858}

/* the dropdown is replaced by the list; this line shows what's selected (only once the list has loaded) */
.at-theme-list-ready #recommended-presets{display:none}
#theme-current{display:flex;align-items:center;gap:12px;min-height:56px;margin-top:8px;padding:8px 12px 8px 8px;border:1px solid #cfcfca;background:#fff}
#theme-current img{flex:none;display:block;width:48px;height:48px;object-fit:cover;background:#e7e5df}
#theme-current span{flex:1;min-width:0}
#theme-current strong{display:block;font-size:14px;font-weight:600;line-height:1.4}
#theme-current small{display:block;font-size:12px;line-height:1.45;color:#555}
#theme-current button{flex:none;padding:6px 0 6px 8px;border:0;background:none;color:#555;font:inherit;font-size:12px;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
#theme-current.is-empty{padding:0;border-style:dashed;background:rgba(255,255,255,.6)}
#theme-current .theme-current-empty{flex:1;min-height:54px;padding:0 14px;text-align:left;text-decoration:none;font-size:14px;color:#666}
#theme-current button:focus-visible{outline:2px solid #496858;outline-offset:2px}

/* the panel now scrolls through a long list: keep the sticky title readable over it */
#plan-modal>.at-plan-header{background:rgba(250,250,248,.94);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);z-index:3}
/* desktop: keep the route bar (「ルートを確定」) on the map beside the open おすすめルート panel */
@media (min-width:769px){.at-recommend-open .at-route-summary:not([hidden]){display:grid;left:476px}}

/* ── テーマから選ぶ: pinned area (selected theme · 旅程を見る · folded settings) above a scrolling list ── */
.at-theme-mode #theme-dock{position:sticky;top:var(--at-head,77px);z-index:2;max-height:calc(100dvh - var(--at-head,77px) - 140px);overflow:auto;padding-bottom:14px;border-bottom:1px solid #ddd;background:rgba(250,250,248,.96);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
.at-theme-mode #theme-dock .at-recommend-themes{padding-top:14px}
.at-theme-mode .at-theme-gallery{margin-top:0;border-top:0}
.at-theme-mode .at-theme-gallery li{scroll-margin-top:calc(var(--at-head,77px) + var(--at-dock,240px) + 8px)}
#theme-settings-toggle{display:none}
.at-theme-mode #theme-settings-toggle{display:flex;align-items:baseline;gap:10px;width:100%;margin-top:10px;padding:8px 0;border:0;border-top:1px solid #e4e4e0;background:none;color:inherit;font:inherit;font-size:13px;text-align:left;cursor:pointer}
#theme-settings-toggle span{font-weight:600}
#theme-settings-toggle small{flex:1;min-width:0;font-size:12px;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#theme-settings-toggle::after{content:"";flex:none;width:7px;height:7px;margin-left:4px;border-right:1.5px solid #555;border-bottom:1.5px solid #555;transform:translateY(-2px) rotate(45deg);transition:transform .15s}
#theme-settings-toggle[aria-expanded="true"]::after{transform:translateY(1px) rotate(-135deg)}
#theme-settings-toggle:focus-visible{outline:2px solid #496858;outline-offset:2px}
.at-theme-mode #theme-dock:not(.is-open) .at-duration-toggle,.at-theme-mode #theme-dock:not(.is-open) .at-recommend-common{display:none}
/* one action: 旅程を見る (the route is drawn as soon as a theme is chosen); the grand tour keeps the app's build button */
.at-theme-dock-ready #recommend-theme-actions{padding-top:4px}
.at-theme-dock-ready #recommend-theme-actions button{width:100%}
.at-theme-dock-ready:not(.at-theme-needs-build) #apply-theme-recommendation,.at-theme-needs-build #theme-view-plan{display:none}
#theme-view-plan:disabled{display:none}
.at-theme-mode #recommend-result{display:none}
#theme-view-plan{display:block;width:100%;min-height:44px;margin:0;padding:10px 14px;border:1px solid #222;border-radius:0;background:#fff;color:#151515;font:inherit;font-size:14px;cursor:pointer}
#theme-view-plan:not(:disabled):hover{background:#151515;color:#fff}
#theme-view-plan:focus-visible{outline:2px solid #496858;outline-offset:2px}

/* card: title and lead use the full width; 「詳しく ›」 sits at the right end of the days · cities · works line */
.at-theme-gallery li{position:relative;display:block}
.at-theme-gallery button{width:100%;align-items:stretch}
.at-theme-gallery img{align-self:flex-start}
.at-theme-gallery button>span{flex:1;display:flex;flex-direction:column}
.at-theme-gallery em{margin-top:auto;padding-top:2px;padding-right:64px;line-height:18px}
.at-theme-gallery a{position:absolute;right:0;bottom:4px;padding:6px 0 6px 12px;line-height:18px}
.at-theme-gallery li:has(button[aria-pressed="true"]) a{right:10px}

/* one h1 per map page (the site title); the panel titles are h2 and keep exactly the same look
   (the h1 rules of navigation.css, typography.css and the page's inline style, mirrored in the same order) */
.at-map-h1{display:contents}
#itinerary-panel h2.at-page-title{font-size:1em;margin:0 0 5px 0;color:inherit}
#itinerary-panel .at-plan-header h2{font-size:19px;margin:0;padding:0;border:0;outline:none}
.at-plan-header h2{font-size:19px;line-height:1.4;margin:0;outline:none}
@media(max-width:768px){.at-plan-header h2{font-size:18px}}
.at-style-drawer .at-plan-header h2{font-size:18px;font-weight:500;margin:0;outline:none}
.at-plan-titlebar h2{flex:1;white-space:nowrap}
@media(max-width:359px){#itinerary-panel .at-plan-titlebar h2{font-size:18px}}
.at-plan-header h2.at-page-title,#itinerary-panel h2.at-page-title{font-family:var(--at-page-title-font);font-size:var(--at-page-title-size);font-weight:400;line-height:1.1;letter-spacing:-.035em;text-align:left;text-transform:uppercase}
