/* TableJourney homepage tools and lower homepage (2026-10-01).
   Loaded only by templates/home.html. The atlas, planner, dish finder and
   where-next tools are built by /js/tj-home-tools.js from /tools/*.json.
   Layout language: small spaced kicker, large serif headline, pill stats,
   a split atlas (dark map left, panel right), photo cards with badges. */

.tj-kicker { font: 700 .72rem/1.2 var(--tj-body); letter-spacing: .18em; text-transform: uppercase;
             color: var(--tj-accent); margin: 0 0 10px; }
.tj-display-h { font-family: var(--tj-display); font-weight: 700; font-size: clamp(1.9rem, 4vw, 3.1rem);
                line-height: 1.06; letter-spacing: -.012em; margin: 0 0 14px; color: var(--tj-text); }
.tj-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tj-tools { margin: 8px 0 0; }
.tj-tool { margin: 0 0 72px; scroll-margin-top: 80px; }
.tj-tool-head { max-width: 760px; margin: 0 0 22px; }
.tj-tool-lede, .tj-atlas-lede { color: var(--tj-muted); font-size: 1.05rem; line-height: 1.65; margin: 0; max-width: 64ch; }
.tj-tools button { font: inherit; color: inherit; }

/* Pills */
.tj-pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 0; }
.tj-pills li { border: 1px solid var(--tj-border); background: var(--tj-surface); border-radius: 999px;
               padding: 6px 13px; font-size: .86rem; color: var(--tj-ink-2, var(--tj-text)); }
.tj-pills b { color: var(--tj-accent); font-weight: 700; }

/* ─ Atlas ─ */
.tj-atlas-band { margin: 0 0 72px; scroll-margin-top: 70px; }
.tj-atlas-intro { max-width: 780px; margin: 0 0 28px; }
.tj-atlas { position: relative; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(340px, 1fr); height: 680px;
            border: 1px solid var(--tj-border); border-radius: 20px; overflow: hidden; background: var(--tj-bg);
            box-shadow: var(--tj-shadow); }
.tj-atlas-stage { position: relative; background: #1c1915; overflow: hidden; }
.tj-atlas-map { position: absolute; inset: 0; background: #0c0c0c; }
/* MapLibre's stylesheet sets .maplibregl-map { position: relative }, which would
   collapse the map to zero height; this keeps it filling the stage. */
.tj-atlas-stage .tj-atlas-map.maplibregl-map, .tj-atlas-stage .tj-atlas-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.tj-atlas-map .maplibregl-ctrl-attrib { background: rgba(20,18,15,.78); color: #9c9283; font-size: 10px; }
.tj-atlas-map .maplibregl-ctrl-attrib a { color: #c9bfae; }
.tj-atlas-map .maplibregl-ctrl-attrib.maplibregl-compact { background: rgba(20,18,15,.78); color: #9c9283; }
.tj-atlas-map .maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button { filter: invert(1); background-color: transparent; }
.tj-atlas-map .maplibregl-ctrl-bottom-right { margin: 0 6px 6px 0; }
.tj-atlas-map .maplibregl-ctrl-group { background: #2a2620; border: 1px solid #3a342c; box-shadow: none; }
.tj-atlas-map .maplibregl-ctrl-group button + button { border-top-color: #3a342c; }
.tj-atlas-map .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(.9); }
.tj-atlas-map .maplibregl-ctrl-bottom-left { margin: 0 0 8px 6px; }
.tj-map-pop .maplibregl-popup-content { background: #f2ede4; color: #1a1714; border-radius: 999px; padding: 5px 12px;
                                         font: 600 .82rem/1.2 var(--tj-display); box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.tj-map-pop .maplibregl-popup-tip { display: none; }
.tj-atlas-map .maplibregl-cooperative-gesture-screen { font: 600 .95rem var(--tj-body); }
.tj-atlas-hint { position: absolute; top: 64px; left: 18px; z-index: 500; margin: 0; pointer-events: none;
                 font: 700 .66rem/1 var(--tj-body); letter-spacing: .16em; text-transform: uppercase; color: #d9b46a; }
.tj-atlas-months { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 600; display: flex; gap: 2px;
                   padding: 4px; border-radius: 999px; background: rgba(28,25,21,.82); backdrop-filter: blur(6px);
                   border: 1px solid #3a342c; overflow-x: auto; scrollbar-width: none; }
.tj-atlas-months::-webkit-scrollbar { display: none; }
.tj-atlas-months a { flex: 1 0 auto; text-align: center; padding: 7px 9px; border-radius: 999px; color: #cfc5b5;
                     text-decoration: none; font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.tj-atlas-months a:hover { color: #fff; background: #332e27; }
.tj-atlas-months a.is-on { background: #E36045; color: #fff; }
.tj-atlas-legend { position: absolute; right: 14px; bottom: 40px; z-index: 500; list-style: none; margin: 0;
                   padding: 10px 14px; border-radius: 10px; background: rgba(28,25,21,.82); border: 1px solid #3a342c;
                   color: #cfc5b5; font-size: .76rem; display: grid; gap: 6px; }
.tj-atlas-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.tj-atlas-legend .is-fest { background: #E36045; box-shadow: 0 0 8px 2px rgba(227,96,69,.6); }
.tj-atlas-legend .is-city { background: #d9b46a; opacity: .8; }
.tj-atlas-legend .is-pick { background: #6d7f4f; }

.tj-fest-dot { width: 12px !important; height: 12px !important; margin: -6px 0 0 -6px !important; border-radius: 50%;
               background: #E36045; border: 2px solid #ffd9cf; box-shadow: 0 0 0 4px rgba(227,96,69,.22), 0 0 16px 5px rgba(227,96,69,.5);
               animation: tjFestPulse 2.6s ease-in-out infinite; }
.tj-fest-dot.is-hot { background: #fff; border-color: #E36045; transform: scale(1.5); }
@keyframes tjFestPulse { 0%,100% { box-shadow: 0 0 0 4px rgba(227,96,69,.22), 0 0 14px 4px rgba(227,96,69,.45); }
                         50% { box-shadow: 0 0 0 7px rgba(227,96,69,.12), 0 0 22px 8px rgba(227,96,69,.6); } }
@media (prefers-reduced-motion: reduce) { .tj-fest-dot { animation: none; } }
.tj-atlas-map .tj-num-pin { width: 26px; height: 26px; border-radius: 50%; background: #55643d; color: #fff;
              border: 2px solid #f2ede4; display: block; text-align: center; text-decoration: none; cursor: pointer;
              font: 700 12px/22px var(--tj-body); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.tj-atlas-map .tj-num-pin:hover { background: #E36045; }
.tj-num-pin.is-hot { background: #E36045; }
.tj-map-label { background: #f2ede4; color: #1a1714; border: 0; border-radius: 999px; padding: 4px 10px;
                font: 600 .8rem/1.2 var(--tj-display); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.tj-map-label::before { display: none; }

/* Panel */
.tj-atlas-panel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--tj-border); background: var(--tj-bg); }
.tj-atlas-search { display: flex; align-items: center; gap: 10px; margin: 16px 18px 8px; padding: 11px 16px;
                   border: 1px solid var(--tj-border); border-radius: 999px; background: var(--tj-surface); color: var(--tj-muted); }
.tj-atlas-search:focus-within { border-color: var(--tj-accent); }
.tj-atlas-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--tj-text);
                         font: 400 .95rem var(--tj-body); }
.tj-atlas-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 18px 22px; scrollbar-width: thin; }
.tj-atlas-noscript { color: var(--tj-muted); }
.tj-atlas-h { font-family: var(--tj-display); font-size: 1.55rem; line-height: 1.15; margin: 0 0 6px; }
.tj-atlas-sub { color: var(--tj-muted); font-size: .88rem; margin: 0 0 12px; }
.tj-chipset { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.tj-chip { border: 1px solid var(--tj-border); background: var(--tj-surface); color: var(--tj-text); border-radius: 999px;
           padding: 6px 12px; font-size: .82rem; cursor: pointer; line-height: 1.2; }
.tj-chip:hover { border-color: var(--tj-accent); }
.tj-chip.is-on { background: var(--tj-text); color: var(--tj-bg); border-color: var(--tj-text); }
.tj-chip small { opacity: .65; margin-left: 4px; }
.tj-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tj-fcard { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3.4; border: 0; padding: 0; border-radius: 10px;
            overflow: hidden; cursor: pointer; background: #2a2620; text-align: left; color: #fff; }
.tj-fcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--tj-ease, ease); }
.tj-fcard:hover img, .tj-fcard:focus-visible img { transform: scale(1.05); }
.tj-fcard-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.78)); }
.tj-fcard-badge { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 999px; font-size: .68rem; font-weight: 700;
                  background: rgba(20,17,15,.72); color: #fff; letter-spacing: .02em; }
.tj-fcard-badge.is-now { background: #E36045; }
.tj-fcard-score { position: absolute; top: 8px; right: 8px; padding: 3px 8px; border-radius: 999px; font-size: .68rem; font-weight: 700;
                  background: #E36045; color: #fff; }
.tj-fcard-body { position: absolute; left: 10px; right: 10px; bottom: 9px; }
.tj-fcard-title { display: block; font: 700 1rem/1.15 var(--tj-display); margin: 0 0 3px;
                  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tj-fcard-meta { display: block; font-size: .72rem; opacity: .85; }
.tj-more-btn { display: block; width: 100%; margin: 12px 0 0; padding: 10px; border-radius: 10px; border: 1px dashed var(--tj-border);
               background: transparent; color: var(--tj-text); cursor: pointer; font-size: .88rem; }
.tj-empty { color: var(--tj-muted); font-size: .92rem; padding: 10px 0; }

/* Panel: detail view */
.tj-back { border: 0; background: transparent; color: var(--tj-accent); cursor: pointer; padding: 4px 0; margin: 0 0 10px; font-size: .88rem; font-weight: 600; }
.tj-detail-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; display: block; margin: 0 0 12px; background: #2a2620; }
.tj-detail-title { font: 700 1.55rem/1.12 var(--tj-display); margin: 2px 0 6px; }
.tj-detail-when { font-size: .92rem; margin: 0 0 14px; color: var(--tj-ink-2, var(--tj-text)); }
.tj-detail-when b { color: var(--tj-accent); }
.tj-scorebar { margin: 0 0 14px; }
.tj-scorebar-top { display: flex; justify-content: space-between; align-items: baseline; }
.tj-scorebar-top span { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--tj-muted); font-weight: 700; }
.tj-scorebar-top b { font: 700 1.7rem/1 var(--tj-display); color: var(--tj-accent); }
.tj-scorebar-track { height: 5px; border-radius: 3px; background: var(--tj-border); margin-top: 6px; overflow: hidden; }
.tj-scorebar-track i { display: block; height: 100%; background: linear-gradient(90deg, #d98a3a, #E36045); border-radius: 3px; }
.tj-detail-focus { font-style: italic; color: var(--tj-ink-2, var(--tj-text)); border-left: 3px solid var(--tj-border);
                   padding: 2px 0 2px 12px; margin: 0 0 16px; font-size: .95rem; line-height: 1.6; }
.tj-rule-h { display: flex; align-items: center; gap: 10px; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
             color: var(--tj-muted); font-weight: 700; margin: 18px 0 10px; }
.tj-rule-h::after { content: ""; flex: 1; height: 1px; background: var(--tj-border); }
.tj-picks { list-style: none; padding: 0; margin: 0; }
.tj-picks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--tj-rule, var(--tj-border)); }
.tj-picks .n { width: 24px; height: 24px; border-radius: 50%; background: #55643d; color: #fff; display: grid; place-items: center; font-size: .74rem; font-weight: 700; }
.tj-picks a { font: 700 1rem/1.25 var(--tj-display); color: var(--tj-text); text-decoration: none; }
.tj-picks a:hover { color: var(--tj-accent); }
.tj-picks small { display: block; color: var(--tj-muted); font-size: .78rem; margin-top: 2px; }
.tj-open { display: inline-block; margin-top: 5px; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 2px 8px;
           border: 1px solid currentColor; }
.tj-open.is-yes { color: var(--tj-good, #3c8a5a); }
.tj-open.is-no { color: var(--tj-accent); }
.tj-xps { display: grid; gap: 10px; }
.tj-xp { display: grid; grid-template-columns: 84px 1fr; gap: 10px; text-decoration: none; color: var(--tj-text);
         border: 1px solid var(--tj-border); border-radius: 10px; overflow: hidden; background: var(--tj-surface); }
.tj-xp img { width: 84px; height: 100%; min-height: 76px; object-fit: cover; }
.tj-xp span { padding: 8px 10px 8px 0; font-size: .86rem; line-height: 1.3; }
.tj-xp b { display: block; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tj-xp em { font-style: normal; color: var(--tj-muted); font-size: .76rem; display: block; margin-top: 4px; }
.tj-xp em strong { color: var(--tj-accent); font-size: .9rem; }
.tj-xp:hover { border-color: var(--tj-accent); }
.tj-btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.tj-btn-s { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 999px; font-size: .86rem; font-weight: 600;
            text-decoration: none; border: 1px solid var(--tj-border); color: var(--tj-text); background: var(--tj-surface); cursor: pointer; }
.tj-tools .tj-btn-s { font: 600 .86rem/1.2 var(--tj-body); }
.tj-btn-s.is-primary { background: var(--tj-accent); border-color: var(--tj-accent); color: #fff; }
.tj-btn-s:hover { border-color: var(--tj-accent); }

/* ─ Planner ─ */
.tj-plan-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end;
                padding: 14px; border: 1px solid var(--tj-border); border-radius: 18px; background: var(--tj-surface); box-shadow: var(--tj-shadow); }
.tj-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tj-field span { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tj-muted); font-weight: 700; padding-left: 4px; }
.tj-field input { width: 100%; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--tj-border);
                  background: var(--tj-bg); color: var(--tj-text); font: 500 1rem var(--tj-body); }
.tj-field input:focus { outline: 0; border-color: var(--tj-accent); }
.tj-plan-go { padding: 13px 22px; border-radius: 12px; border: 0; background: var(--tj-accent); color: #fff !important;
              font-weight: 700 !important; cursor: pointer; white-space: nowrap; }
.tj-plan-out { margin-top: 18px; }
.tj-plan-banner { position: relative; border-radius: 18px; overflow: hidden; min-height: 210px; display: flex; align-items: flex-end;
                  color: #fff; background: #2a2620; margin: 0 0 14px; }
.tj-plan-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tj-plan-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.15) 70%); }
.tj-plan-banner-in { position: relative; z-index: 1; padding: 22px 24px; }
.tj-plan-banner .tj-kicker { color: #ffb8a6; }
.tj-plan-banner h3 { font: 700 clamp(1.6rem, 3vw, 2.3rem)/1.05 var(--tj-display); margin: 0 0 8px; color: #fff; }
.tj-plan-banner p { margin: 0; font-size: .95rem; opacity: .92; }
.tj-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.tj-plan-card { border: 1px solid var(--tj-border); border-radius: 16px; background: var(--tj-surface); padding: 16px 18px; min-width: 0; }
.tj-plan-card h4 { font: 700 1.15rem/1.2 var(--tj-display); margin: 0 0 4px; }
.tj-plan-card > p.tj-plan-sub { color: var(--tj-muted); font-size: .85rem; margin: 0 0 10px; }
.tj-flist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tj-flist li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.tj-flist img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #2a2620; }
.tj-flist a { font: 700 1rem/1.2 var(--tj-display); color: var(--tj-text); text-decoration: none; }
.tj-flist a:hover { color: var(--tj-accent); }
.tj-flist small { display: block; color: var(--tj-muted); font-size: .8rem; margin-top: 2px; }
.tj-flist small b { color: var(--tj-accent); font-weight: 700; }
.tj-season { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tj-season li { padding: 0 0 10px; border-bottom: 1px solid var(--tj-rule, var(--tj-border)); }
.tj-season li:last-child { border-bottom: 0; padding-bottom: 0; }
.tj-season b { display: block; font-weight: 700; }
.tj-season span { color: var(--tj-muted); font-size: .86rem; line-height: 1.5; }
.tj-plan-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ─ Dish finder ─ */
.tj-dishfind { scroll-margin-top: 80px; }
.tj-sentence { max-width: 980px; }
.tj-blank { display: inline-block; position: relative; vertical-align: baseline; }
.tj-blank input { font: inherit; color: var(--tj-accent); background: transparent; border: 0; border-bottom: 3px solid var(--tj-accent);
                  width: 6.5ch; min-width: 3ch; max-width: 100%; padding: 0 2px; outline: 0; letter-spacing: inherit; }
.tj-blank input::placeholder { color: var(--tj-accent); opacity: .45; }
.tj-blank input::-webkit-search-cancel-button { display: none; }
.tj-dish-out { margin-top: 10px; }
.tj-dish-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 6px 0 14px; color: var(--tj-muted); font-size: .92rem; }
.tj-dish-head b { color: var(--tj-text); }
.tj-rank { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.tj-rank li { display: grid; grid-template-columns: 44px 96px 1fr; gap: 14px; align-items: start; padding: 16px 0;
              border-bottom: 1px solid var(--tj-rule, var(--tj-border)); }
.tj-rank-n { font: 700 2rem/1 var(--tj-display); color: var(--tj-accent); }
.tj-rank img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; background: #2a2620; }
.tj-rank h3 { font: 700 1.2rem/1.2 var(--tj-display); margin: 0 0 4px; }
.tj-rank h3 a { color: var(--tj-text); text-decoration: none; }
.tj-rank h3 a:hover { color: var(--tj-accent); }
.tj-rank h3 small { font: 400 .8rem var(--tj-body); color: var(--tj-muted); margin-left: 6px; }
.tj-rank p { margin: 0 0 4px; font-size: .88rem; line-height: 1.5; color: var(--tj-ink-2, var(--tj-text)); max-width: none; }
.tj-rank p span { color: var(--tj-muted); }
.tj-rank p a { color: var(--tj-text); }
.tj-rank .tj-rank-fest { color: var(--tj-accent); font-weight: 600; }

/* ─ Where next ─ */
.tj-quiz-form { display: grid; grid-template-columns: 1.1fr 1.6fr 1.3fr .8fr; gap: 14px; margin: 0 0 18px; }
.tj-quiz-form fieldset { border: 1px solid var(--tj-border); border-radius: 14px; padding: 12px 12px 10px; margin: 0; min-width: 0; background: var(--tj-surface); }
.tj-quiz-form legend { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--tj-muted); font-weight: 700; padding: 0 6px; }
.tj-quiz-form label { display: inline-block; margin: 3px 2px; cursor: pointer; }
.tj-quiz-form input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.tj-quiz-form label span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--tj-border); font-size: .86rem; background: var(--tj-bg); }
.tj-quiz-form input:checked + span { background: var(--tj-text); color: var(--tj-bg); border-color: var(--tj-text); }
.tj-quiz-form input:focus-visible + span { outline: 2px solid var(--tj-accent); outline-offset: 2px; }
.tj-quiz-form select { width: 100%; margin-top: 4px; padding: 9px 34px 9px 10px; border-radius: 10px; border: 1px solid var(--tj-border);
                       background-color: var(--tj-bg); color: var(--tj-text); font: 500 .95rem var(--tj-body); }
.tj-quiz-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tj-qcard { border-radius: 18px; overflow: hidden; border: 1px solid var(--tj-border); background: var(--tj-surface); display: flex; flex-direction: column; }
.tj-qcard-media { position: relative; aspect-ratio: 4 / 3; background: #2a2620; color: #fff; display: block; text-decoration: none; }
.tj-qcard-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--tj-ease, ease); }
.tj-qcard-media:hover img { transform: scale(1.04); }
.tj-qcard-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.75)); }
.tj-qcard-rank { position: absolute; top: 12px; left: 12px; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: var(--tj-accent);
                 display: grid; place-items: center; font: 700 1.05rem/1 var(--tj-display); }
.tj-qcard-name { position: absolute; left: 16px; bottom: 12px; z-index: 1; font: 700 1.6rem/1.05 var(--tj-display); }
.tj-qcard-name small { display: block; font: 600 .74rem/1.4 var(--tj-body); letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.tj-qcard ul { list-style: none; margin: 0; padding: 14px 16px 6px; display: grid; gap: 9px; }
.tj-qcard li { position: relative; padding-left: 18px; font-size: .9rem; line-height: 1.45; }
.tj-qcard li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--tj-accent); }
.tj-qcard li a { color: var(--tj-text); }
.tj-qcard-foot { margin-top: auto; padding: 8px 16px 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.tj-quiz-again { margin-top: 12px; }

/* ─ What are you hungry for ─ */
.tj-hungry, .tj-best, .tj-index { border-top: 0 !important; }
.tj-mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 190px; grid-auto-flow: dense; gap: 10px; margin: 18px 0 16px; }
.tj-mosaic-tile { position: relative; border-radius: 14px; overflow: hidden; color: #fff; text-decoration: none; background: #2a2620; }
.tj-mosaic-tile.is-lead { grid-column: span 2; grid-row: span 2; }
.tj-mosaic-tile:nth-child(5) { grid-column: span 2; }
.tj-mosaic-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--tj-ease, ease); }
.tj-mosaic-tile:hover img { transform: scale(1.05); }
.tj-mosaic-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.72)); }
.tj-mosaic-body { position: absolute; left: 16px; right: 16px; bottom: 13px; }
.tj-mosaic-name { display: block; font: 700 1.3rem/1.1 var(--tj-display); }
.tj-mosaic-tile.is-lead .tj-mosaic-name { font-size: 2rem; }
.tj-mosaic-n { display: block; font-size: .78rem; opacity: .88; margin-top: 3px; }
/* Every topic has a photo (2026-10-03): the eight lead tiles, then the rest as a
   denser grid of smaller tiles in place of the old icon chips. */
.tj-mosaic.tj-mosaic-sm { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 130px; margin-top: 0; }
.tj-mosaic-sm .tj-mosaic-tile:nth-child(5) { grid-column: auto; }
.tj-mosaic-sm .tj-mosaic-tile:first-child { grid-column: span 2; } /* 17 tiles fill three rows of six */
.tj-mosaic-sm .tj-mosaic-name { font-size: 1.05rem; }
.tj-mosaic-sm .tj-mosaic-body { left: 12px; right: 12px; bottom: 10px; }
.tj-topic-chips { margin-top: 4px; }

/* ─ World's best ─ */
.tj-best-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 23.5%); gap: 12px; overflow-x: auto;
                scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.tj-best-card { position: relative; scroll-snap-align: start; border-radius: 16px; overflow: hidden; min-height: 300px; color: #fff;
                background: #2a2620; display: flex; }
.tj-best-card picture, .tj-best-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tj-best-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.1) 35%, rgba(0,0,0,.82)); }
.tj-best-body { position: relative; z-index: 1; padding: 16px; width: 100%; display: flex; flex-direction: column; }
.tj-best-list { margin: 0 0 auto !important; padding-bottom: 40px; }
.tj-best-body p { margin: 0; max-width: none; color: #fff; }
.tj-best-list a { display: inline-block; max-width: 100%; color: #fff; font-size: .68rem; line-height: 1.35; letter-spacing: .12em;
                  text-transform: uppercase; font-weight: 700; text-decoration: none; background: rgba(20,17,15,.62); padding: 5px 10px; border-radius: 10px; }
.tj-best-no { font: 700 .74rem/1 var(--tj-body) !important; letter-spacing: .16em; text-transform: uppercase; color: #ffb8a6 !important; margin-bottom: 6px !important; }
.tj-best-name a { color: #fff; font: 700 1.35rem/1.1 var(--tj-display); text-decoration: none; }
.tj-best-name a:hover { text-decoration: underline; }
.tj-best-city { font-size: .84rem; opacity: .85; margin-top: 4px !important; }
.tj-best-more { color: var(--tj-muted); font-size: .9rem; margin-top: 12px; }

/* ─ How this guide is made ─ */
.tj-method { width: 100vw; margin: 20px 0 56px calc(50% - 50vw); padding: 56px max(16px, calc(50vw - 600px + 24px));
             background: var(--tj-surface); border-top: 1px solid var(--tj-border); border-bottom: 1px solid var(--tj-border);
             display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.tj-method-lede { color: var(--tj-muted); font-size: 1.02rem; line-height: 1.7; max-width: 60ch; }
.tj-method-steps { padding-left: 20px; margin: 16px 0 0; display: grid; gap: 10px; max-width: 64ch; }
.tj-method-steps li { line-height: 1.6; padding-left: 4px; }
.tj-method-links { display: flex; gap: 18px; margin-top: 16px; }
.tj-method-links a { color: var(--tj-accent); font-weight: 600; }
.tj-cite-card { border: 1px solid var(--tj-border); border-radius: 14px; background: var(--tj-bg); padding: 22px 24px; }
.tj-cite-card h3 { font: 700 1.3rem/1.2 var(--tj-display); margin: 0 0 10px; }
.tj-cite-card p { line-height: 1.65; margin: 0 0 12px; }
.tj-cite-card a { color: var(--tj-accent); }
.tj-cite-small { color: var(--tj-muted); font-size: .85rem; margin: 0 !important; }

/* ─ Full index ─ */
.tj-index-sub { color: var(--tj-muted); font-size: .92rem; margin: 0 0 18px; }
.tj-index-block h3, .tj-index-row summary { font: 700 1rem/1.3 var(--tj-body); margin: 0; }
.tj-index-block h3 span, .tj-index-row summary span { color: var(--tj-muted); font-weight: 400; font-size: .85rem; margin-left: 8px; }
.tj-index-block { padding: 0 0 16px; border-bottom: 1px solid var(--tj-rule, var(--tj-border)); }
.tj-index-countries { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px 16px; margin-top: 12px; }
.tj-index-countries a { display: flex; align-items: center; gap: 8px; padding: 5px 0; color: var(--tj-text); text-decoration: none; font-size: .9rem; min-width: 0; }
.tj-index-countries a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tj-index-countries a:hover { color: var(--tj-accent); }
.tj-index-countries img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.tj-index-row { border-bottom: 1px solid var(--tj-rule, var(--tj-border)); }
.tj-index-row summary { padding: 14px 0; cursor: pointer; list-style: none; }
.tj-index-row summary::-webkit-details-marker { display: none; }
.tj-index-row summary { display: flex; align-items: baseline; gap: 0; transition: color .2s; }
.tj-index-row summary:hover { color: var(--tj-accent); }
.tj-index-row summary::before { content: ""; flex-shrink: 0; width: 8px; height: 8px; margin: 0 12px 0 2px; align-self: center;
                                border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
                                transform: rotate(-45deg); transition: transform .28s cubic-bezier(.2,.7,.2,1); }
.tj-index-row[open]:not(.js-anim) summary::before, .tj-index-row.is-open summary::before { transform: rotate(45deg); }
.tj-index-row .tj-index-links { overflow: hidden; }
.tj-index-row .tj-index-links a { transition: color .15s; }
.tj-index-row .tj-index-links a:hover { color: var(--tj-accent); }
.tj-index-links { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 0 16px 18px; }
.tj-index-links a { color: var(--tj-text); font-size: .92rem; }
.tj-index-links a.is-all { color: var(--tj-accent); font-weight: 600; }

/* ─ Responsive ─ */
@media (max-width: 1100px) {
  .tj-quiz-form { grid-template-columns: 1fr 1fr; }
  .tj-index-countries { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tj-atlas { grid-template-columns: 1fr; height: auto; }
  .tj-atlas-stage { height: 440px; }
  .tj-atlas-panel { border-left: 0; border-top: 1px solid var(--tj-border); max-height: 640px; }
  .tj-atlas-legend { bottom: 18px; }
  .tj-plan-form { grid-template-columns: 1fr 1fr; }
  .tj-field-city, .tj-plan-go { grid-column: 1 / -1; }
  .tj-plan-grid, .tj-rank { grid-template-columns: 1fr; }
  .tj-quiz-cards { grid-template-columns: 1fr; }
  .tj-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; }
  .tj-mosaic-tile:nth-child(5) { grid-column: span 2; }
  .tj-mosaic.tj-mosaic-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 110px; }
  .tj-mosaic-sm .tj-mosaic-tile:nth-child(5) { grid-column: auto; }
  .tj-mosaic-sm .tj-mosaic-tile:first-child { grid-column: span 2; }
  .tj-best-grid { grid-auto-columns: minmax(220px, 72%); }
  .tj-method { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; padding-bottom: 40px; }
  .tj-index-countries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tj-atlas-stage { height: 380px; }
  .tj-atlas-hint { display: none; }
  .tj-atlas-legend { display: none; }
  .tj-fgrid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tj-quiz-form { grid-template-columns: 1fr; }
  .tj-rank li { grid-template-columns: 34px 72px 1fr; gap: 10px; }
  .tj-rank img { width: 72px; height: 72px; }
  .tj-rank-n { font-size: 1.5rem; }
  .tj-mosaic-tile.is-lead .tj-mosaic-name { font-size: 1.5rem; }
}

/* Planner results, compact layout (2026-10-02): fixed rows, no uneven 2x2 gaps. */
.tj-plan-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.tj-plan-fests, .tj-plan-book { grid-column: 1 / -1; }
.tj-plan-layout .tj-plan-card { padding: 14px 16px; }
.tj-plan-head { margin: 0 0 10px; }
.tj-plan-head .tj-plan-sub { margin: 2px 0 0; }
.tj-plan-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.tj-plan-all { color: var(--tj-accent); font-size: .86rem; font-weight: 600; white-space: nowrap; }
.tj-fstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.tj-fchip { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px; border-radius: 12px;
            border: 1px solid var(--tj-border); background: var(--tj-bg); color: var(--tj-text); text-decoration: none; min-width: 0; }
.tj-fchip:hover { border-color: var(--tj-accent); }
.tj-fchip img { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; background: #2a2620; }
.tj-fchip span { min-width: 0; }
.tj-fchip b { display: block; font: 700 .95rem/1.2 var(--tj-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tj-fchip small { display: block; color: var(--tj-muted); font-size: .76rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tj-fchip em { font-style: normal; color: var(--tj-accent); font-weight: 700; }
.tj-fchip.is-near { opacity: .78; }
.tj-fchip.is-near em { color: var(--tj-muted); }
.tj-picks-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.tj-picks-2col li { padding: 7px 0; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; }
.tj-picks-2col .n { width: 22px; height: 22px; font-size: .7rem; margin-top: 1px; }
.tj-pick-main { min-width: 0; }
.tj-pick-main a { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tj-pick-main small { display: inline; margin: 0 6px 0 0; font-size: .74rem; }
.tj-pick-main .tj-open { margin-top: 3px; font-size: .64rem; padding: 1px 7px; }
/* Planner: where to stay, car hire (2026-10-03). Rows are whole-row links to partners. */
.tj-plan-card.tj-plan-stay ul.tj-season, .tj-plan-card.tj-plan-cars ul.tj-season { padding: 0; gap: 8px; }
.tj-plan-card.tj-plan-stay ul.tj-season li, .tj-plan-card.tj-plan-cars ul.tj-season li { padding: 0 0 8px; margin: 0; }
.tj-plan-stay .tj-season a, .tj-plan-cars .tj-season a { display: block; color: inherit; text-decoration: none; }
.tj-plan-stay .tj-season b, .tj-plan-cars .tj-season b { color: var(--tj-accent); font-size: .95rem; }
.tj-plan-stay .tj-season a:hover b, .tj-plan-cars .tj-season a:hover b { text-decoration: underline; }
.tj-plan-season .tj-season { gap: 8px; }
.tj-plan-season .tj-season li { padding: 0 0 8px; }
.tj-plan-season .tj-season b { font-size: .9rem; line-height: 1.3; }
.tj-plan-season .tj-season span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
                                  font-size: .8rem; line-height: 1.45; margin-top: 2px; }
.tj-plan-season .tj-rule-h { margin: 12px 0 8px; }
.tj-dishchips { display: flex; flex-wrap: wrap; gap: 6px; }
.tj-dishchips a { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border-radius: 999px; max-width: 100%;
                  border: 1px solid var(--tj-border); background: var(--tj-bg); color: var(--tj-text); text-decoration: none; font-size: .82rem; font-weight: 600; }
.tj-dishchips a:hover { border-color: var(--tj-accent); }
.tj-dishchips img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.tj-dishchips span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tj-xprow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tj-xpc { display: flex; flex-direction: column; border: 1px solid var(--tj-border); border-radius: 12px; overflow: hidden;
          background: var(--tj-bg); color: var(--tj-text); text-decoration: none; min-width: 0; }
.tj-xpc:hover { border-color: var(--tj-accent); }
.tj-xpc img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #2a2620; }
.tj-xpc span { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tj-xpc b { font-size: .84rem; line-height: 1.3; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tj-xpc em { font-style: normal; color: var(--tj-muted); font-size: .74rem; }
.tj-xpc strong { margin-top: auto; color: var(--tj-accent); font-size: .9rem; }

/* Where next, one compact card of four rows (2026-10-02): label left, one line of pills right. */
.tj-quiz-card { border: 1px solid var(--tj-border); border-radius: 16px; background: var(--tj-surface); padding: 6px 16px; margin: 0 0 18px; }
.tj-quiz-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 12px; padding: 9px 0;
               border: 0; border-bottom: 1px solid var(--tj-rule, var(--tj-border)); margin: 0; min-width: 0; }
.tj-quiz-row:last-child { border-bottom: 0; }
.tj-quiz-row legend { float: left; padding: 0; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--tj-muted); font-weight: 700; }
.tj-quiz-label { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--tj-muted); font-weight: 700; }
.tj-quiz-pills { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tj-quiz-pills label { display: inline-flex; margin: 0; cursor: pointer; }
.tj-quiz-pills input { position: absolute; opacity: 0; pointer-events: none; }
.tj-quiz-pills span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--tj-border); font-size: .85rem;
                      background: var(--tj-bg); white-space: nowrap; line-height: 1.2; }
.tj-quiz-pills label:hover span { border-color: var(--tj-accent); }
.tj-quiz-pills input:checked + span { background: var(--tj-text); color: var(--tj-bg); border-color: var(--tj-text); }
.tj-quiz-pills input:focus-visible + span { outline: 2px solid var(--tj-accent); outline-offset: 2px; }
.tj-quiz-months span { padding: 6px 10px; min-width: 44px; text-align: center; }

@media (max-width: 900px) {
  .tj-plan-layout { grid-template-columns: minmax(0, 1fr); }
  .tj-xprow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tj-picks-2col { grid-template-columns: minmax(0, 1fr); }
  .tj-plan-head-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .tj-fstrip { grid-template-columns: minmax(0, 1fr); }
  .tj-quiz-card { padding: 4px 12px; }
  .tj-quiz-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 0; }
  .tj-quiz-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -12px; padding-right: 12px; }
  .tj-quiz-pills::-webkit-scrollbar { display: none; }
}

/* Tools on their own pages (2026-10-02): /plan/, /dishes/, /festivals/ and every
   city hub embed the homepage tools through templates/partials/_tool_*.html. */
.tj-tool-more { margin: 12px 0 0; font-size: .9rem; }
.tj-tool-more a { color: var(--tj-accent); font-weight: 600; }
.tj-tools-embed { margin: 8px 0 40px; }
.tj-tools-embed .tj-atlas-band, .tj-tools-embed .tj-tool { margin-bottom: 0; }
.tj-tools-embed .tj-tool-head { margin-bottom: 16px; }
.tj-tools-embed .tj-display-h { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.tj-plan-hub { scroll-margin-top: 90px; }
.tj-plan-trips { margin-top: 8px; }
.tj-plan-trip-list { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 24px; }
.tj-plan-trip-list li { padding: 8px 0; border-bottom: 1px solid var(--tj-rule, var(--tj-border)); }
.tj-plan-trip-list a { font: 700 1rem/1.25 var(--tj-display); color: var(--tj-text); text-decoration: none; display: block; }
.tj-plan-trip-list a:hover { color: var(--tj-accent); }
.tj-plan-trip-list span { color: var(--tj-muted); font-size: .82rem; }
/* Host pages (city hubs, chrome pages) colour every .tj-section p; keep the
   planner's own colours. */
.tj-tools .tj-plan-banner p, .tj-tools .tj-plan-banner h3 { color: #fff; max-width: none; }
.tj-tools .tj-plan-sub { color: var(--tj-muted); font-size: .86rem; max-width: none; }
.tj-tools .tj-tool-lede { color: var(--tj-muted); }

/* Pick rows, v3 (2026-10-02, owner: badges wandered and were too big): number |
   name over meta | status tag, the tag always in its own right-hand column. */
.tj-picks li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.tj-picks-2col li { grid-template-columns: 24px minmax(0, 1fr) auto; padding: 9px 0; gap: 10px; }
.tj-pick-main a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tj-pick-main small { display: block; margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tj-pk-st { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 600; white-space: nowrap;
            color: var(--tj-muted); justify-self: end; }
.tj-pk-st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.tj-pk-st.is-yes { color: var(--tj-good, #3c8a5a); }
.tj-pk-st.is-no { color: var(--tj-accent); }
/* Narrow homes for the list (the atlas panel, phones, the hub's middle column):
   the tag drops under the meta line, at the same place on every row. */
.tj-atlas-body .tj-picks li { grid-template-columns: 26px minmax(0, 1fr); align-items: start; }
.tj-atlas-body .tj-pk-st { grid-column: 2; justify-self: start; margin-top: -4px; }
@media (max-width: 1100px) {
  .tj-plan-hub .tj-picks-2col li, .tj-picks-2col li { grid-template-columns: 24px minmax(0, 1fr); align-items: start; }
  .tj-picks-2col .tj-pk-st { grid-column: 2; justify-self: start; margin-top: -4px; }
}

/* Card hovers: no underline from the site's link rule; an accent border and a
   small lift instead. */
.tj-tools a.tj-fchip, .tj-tools a.tj-xpc, .tj-tools a.tj-xp, .tj-tools .tj-dishchips a, .tj-tools a.tj-qcard-media,
.tj-tools a.tj-btn-s, .tj-tools a.tj-chip, .tj-tools .tj-fcard, .tj-hungry a.tj-mosaic-tile,
.tj-tools a.tj-fchip:hover, .tj-tools a.tj-xpc:hover, .tj-tools a.tj-xp:hover, .tj-tools .tj-dishchips a:hover,
.tj-tools a.tj-qcard-media:hover, .tj-tools a.tj-btn-s:hover, .tj-tools a.tj-chip:hover, .tj-hungry a.tj-mosaic-tile:hover,
.tj-tools a.tj-fchip *, .tj-tools a.tj-xpc *, .tj-tools a.tj-xp *, .tj-tools .tj-dishchips a * { text-decoration: none; }
.tj-tools a.tj-fchip, .tj-tools a.tj-xpc, .tj-tools a.tj-xp { transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.tj-tools a.tj-fchip:hover, .tj-tools a.tj-xpc:hover, .tj-tools a.tj-xp:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.tj-tools a.tj-fchip:hover b, .tj-tools a.tj-xpc:hover b { color: var(--tj-accent); }
.tj-tools .tj-picks a:hover, .tj-tools .tj-flist a:hover, .tj-rank h3 a:hover { text-decoration: none; color: var(--tj-accent); }
@media (prefers-reduced-motion: reduce) { .tj-tools a.tj-fchip:hover, .tj-tools a.tj-xpc:hover, .tj-tools a.tj-xp:hover { transform: none; } }
