*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--guide-paper);
  color: var(--guide-ink);
  font-family: var(--guide-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3 { font-family: var(--guide-serif); font-weight: 500; line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
a { color: var(--guide-ink); }
img { max-width: 100%; height: auto; display: block; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--guide-ink);
  color: var(--guide-paper); padding: .6rem 1rem; z-index: 50;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--guide-gold); outline-offset: 2px; }

.guide-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1rem; border-bottom: 1px solid var(--guide-line); background: var(--guide-card);
}
.wordmark { font-family: var(--guide-serif); letter-spacing: .16em; text-decoration: none; color: var(--guide-gold); }
.guide-header nav a { margin-left: 1rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--guide-ink-soft); }

main { max-width: 900px; margin: 0 auto; padding: 1rem; }
.intro { max-width: var(--guide-measure); color: var(--guide-ink-soft); }

.actions-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--guide-tap); padding: .55rem 1rem; border-radius: var(--guide-radius);
  border: 1px solid var(--guide-line); background: var(--guide-card); color: var(--guide-ink);
  font: inherit; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--guide-ink); color: var(--guide-paper); border-color: var(--guide-ink); }
.btn-quiet { background: transparent; }
.btn:hover { border-color: var(--guide-gold); }
.linklike { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; font: inherit; color: inherit; }

.filters { border: 1px solid var(--guide-line); border-radius: var(--guide-radius); background: var(--guide-card); padding: .8rem; margin-bottom: 1rem; }
.filters fieldset { border: 0; margin: 0 0 .7rem; padding: 0; }
.filters legend { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--guide-ink-faint); padding: 0 0 .3rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 38px;
  padding: .25rem .7rem; border: 1px solid var(--guide-line); border-radius: 999px;
  background: var(--guide-paper); font-size: .88rem; cursor: pointer;
}
.chip input { margin: 0; }
.chip.is-empty { opacity: .45; }
.chip.is-on { border-color: var(--guide-gold); background: var(--guide-gold-soft); }
.search-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.search-row input[type="search"], .search-row select {
  min-height: var(--guide-tap); padding: .5rem .7rem; border: 1px solid var(--guide-line);
  border-radius: var(--guide-radius); background: var(--guide-card); font: inherit; flex: 1 1 12rem;
}
.result-line { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: .5rem 0; color: var(--guide-ink-soft); font-size: .9rem; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.card {
  border: 1px solid var(--guide-line); border-radius: var(--guide-radius);
  background: var(--guide-card); overflow: hidden;
}
.card a.card-link { display: grid; grid-template-columns: 104px 1fr; gap: .8rem; text-decoration: none; padding: .7rem; }
.card-thumb { width: 104px; height: 104px; object-fit: cover; border-radius: 6px; background: var(--guide-gold-soft); }
.card-thumb.placeholder { display: flex; align-items: center; justify-content: center; font-family: var(--guide-serif); color: var(--guide-gold); font-size: .8rem; text-align: center; }
.card h2 { font-size: 1.05rem; margin-bottom: .1rem; }
.card .local { color: var(--guide-ink-faint); font-size: .85rem; }
.card .meta { color: var(--guide-ink-soft); font-size: .82rem; margin: .25rem 0; }
.card .why { font-size: .9rem; color: var(--guide-ink-soft); }
.card .best-for { font-size: .85rem; }

.badges { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0; }
.badge { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 4px; border: 1px solid var(--guide-line); }
.badge-pick { background: var(--guide-gold-soft); border-color: var(--guide-gold); color: #6d5320; }
.badge-visit { background: #eef3ee; border-color: #cfe0d3; color: var(--guide-green); }
.badge-distance { background: var(--guide-paper); }

.tour-module { border: 1px solid var(--guide-gold); border-radius: var(--guide-radius); background: var(--guide-gold-soft); padding: .9rem; margin: .8rem 0; }
.tour-module h2 { font-size: 1rem; }
.tour-module .kind { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #6d5320; }

.city-switcher { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1rem; }
.city-switcher .chip { text-decoration: none; font-weight: 500; }
.guide-header nav a[aria-current="page"] { color: var(--guide-gold); font-weight: 600; }

.share-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin: .9rem 0 1.1rem; padding: .7rem .85rem;
  border: 1px solid var(--guide-line); border-radius: var(--guide-radius);
  background: var(--guide-card);
}
.share-qr-details { position: relative; }
.share-qr-details summary { list-style: none; }
.share-qr-details summary::-webkit-details-marker { display: none; }
.share-qr-panel {
  margin-top: .6rem; padding: .8rem; border: 1px solid var(--guide-line);
  border-radius: var(--guide-radius); background: var(--guide-paper); text-align: center;
}
.share-qr-panel .qr-svg svg { max-width: 180px; height: auto; margin: 0 auto; display: block; }

.advice-box {
  border: 1px solid var(--guide-gold); border-radius: var(--guide-radius);
  background: var(--guide-gold-soft); padding: 1rem; margin: 1rem 0;
}
.advice-header { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.advice-header h2 { margin: 0; font-size: 1.1rem; color: var(--guide-ink); text-transform: none; letter-spacing: 0; }
.advice-list { margin: .5rem 0; padding-left: 1.2rem; font-size: .92rem; }
.advice-list li { margin-bottom: .35rem; }

.guide-tip-inline {
  font-size: .84rem; color: #5b4418; background: var(--guide-gold-soft);
  border-left: 3px solid var(--guide-gold); padding: .3rem .55rem; margin: .35rem 0;
  border-radius: 0 4px 4px 0;
}
.card-share-row {
  display: flex; flex-wrap: wrap; gap: .4rem; padding: .45rem .7rem;
  border-top: 1px solid var(--guide-line); background: var(--guide-paper);
}
.btn-sm { min-height: 34px; padding: .25rem .65rem; font-size: .82rem; }

.detail header .local { font-family: var(--guide-serif); font-size: 1.1rem; color: var(--guide-ink-soft); }
.taxi { border: 2px solid var(--guide-ink); border-radius: var(--guide-radius); background: var(--guide-card); padding: .2rem .8rem; margin: .9rem 0; }
.taxi summary { min-height: var(--guide-tap); display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.taxi .jp-name { font-size: 1.6rem; font-family: var(--guide-serif); line-height: 1.3; }
.taxi .jp-address { font-size: 1.2rem; }
.taxi .driver-line { margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--guide-line); font-size: 1.1rem; }

.section { margin: 1.2rem 0; max-width: var(--guide-measure); }
.section h2 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--guide-ink-faint); }
.before-list, .tips-list { margin: 0; padding-left: 1.1rem; }
.attr-group { margin: .4rem 0; }
.attr-group .group-name { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--guide-ink-faint); }
.attr { display: inline-block; border: 1px solid var(--guide-line); border-radius: 999px; padding: .15rem .6rem; margin: .15rem .2rem .15rem 0; font-size: .85rem; }
.attr .checked { color: var(--guide-ink-faint); font-size: .78rem; }
.note { color: var(--guide-ink-soft); font-size: .88rem; }
.disclaimer { font-size: .82rem; color: var(--guide-ink-faint); border-top: 1px solid var(--guide-line); padding-top: .7rem; }
.disclosure { border-left: 3px solid var(--guide-gold); padding-left: .7rem; }

.consent {
  position: sticky; bottom: 0; z-index: 30; background: var(--guide-card);
  border-top: 1px solid var(--guide-line); padding: .8rem 1rem;
}
.consent p { margin: 0 0 .5rem; font-size: .88rem; max-width: var(--guide-measure); }
.consent-actions { display: flex; gap: .5rem; }
.consent-actions form { margin: 0; }

.guide-footer { border-top: 1px solid var(--guide-line); margin-top: 2rem; padding: 1.2rem 1rem 3rem; color: var(--guide-ink-faint); font-size: .82rem; }
.guide-footer p { max-width: var(--guide-measure); }

form.stack label { display: block; margin: .7rem 0 .2rem; font-size: .9rem; }
form.stack input[type="text"], form.stack input[type="email"], form.stack input[type="url"],
form.stack input[type="number"], form.stack select, form.stack textarea {
  width: 100%; min-height: var(--guide-tap); padding: .5rem .6rem;
  border: 1px solid var(--guide-line); border-radius: var(--guide-radius); font: inherit; background: var(--guide-card);
}
form.stack textarea { min-height: 8rem; }
.honeypot { position: absolute; left: -9999px; }
.error { color: var(--guide-red); }

#guide-map { height: 60vh; border-radius: var(--guide-radius); border: 1px solid var(--guide-line); }
#guide-map.guide-map { height: 36vh; min-height: 220px; position: sticky; top: 0; z-index: 20; margin: 0 0 .8rem; }
[hidden] { display: none !important; }

table.admin { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.admin th, table.admin td { border-bottom: 1px solid var(--guide-line); padding: .4rem .5rem; text-align: left; vertical-align: top; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .7rem; }
.kpi { border: 1px solid var(--guide-line); border-radius: var(--guide-radius); background: var(--guide-card); padding: .7rem; }
.kpi .value { font-size: 1.6rem; font-family: var(--guide-serif); }
.kpi .go { color: var(--guide-green); }
.kpi .stop { color: var(--guide-red); }

/* Hero, category tabs, map <-> card link (ported from the customer web UX) */
.hero { background: var(--guide-ink); color: var(--guide-paper); border-radius: var(--guide-radius); padding: 1.4rem 1rem 1rem; margin: 0 0 1rem; text-align: center; }
.hero h1 { color: var(--guide-paper); margin-bottom: .5rem; }
.hero .intro { color: #d9d2c0; margin: 0 auto 1rem; }
.hero-eyebrow { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--guide-gold-bright); margin: 0 0 .6rem; }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.tab {
  display: inline-flex; align-items: center; min-height: var(--guide-tap); padding: .3rem .95rem;
  border: 1.5px solid #4a463a; border-radius: 999px; color: var(--guide-paper); text-decoration: none;
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
}
.tab:hover { border-color: var(--guide-gold-bright); }
.tab.is-on { background: var(--guide-gold-bright); border-color: var(--guide-gold-bright); color: var(--guide-ink); font-weight: 600; }
.tab .count { margin-left: .35rem; opacity: .75; }

details.filters-more { margin-bottom: 1rem; }
details.filters-more > summary { min-height: var(--guide-tap); display: flex; align-items: center; cursor: pointer; font-weight: 600; }
details.filters-more > summary::-webkit-details-marker { display: none; }
details.filters-more > summary::before { content: "+"; display: inline-block; width: 1.2rem; color: var(--guide-gold); }
details.filters-more[open] > summary::before { content: "−"; }

.map-dot {
  width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid #fff; cursor: pointer;
  background: var(--guide-gold-bright); box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.map-dot.is-pick { background: var(--guide-red); }
.map-pop { font-family: var(--guide-sans); display: grid; gap: .15rem; }
.map-pop strong { font-family: var(--guide-serif); font-size: 1rem; }
.map-pop span { color: var(--guide-ink-soft); font-size: .8rem; }
.map-pop a { color: var(--guide-red); font-size: .85rem; }

.card { scroll-margin-top: calc(36vh + 1rem); transition: border-color .2s, box-shadow .2s; }
.card.is-active { border: 2px solid var(--guide-gold-bright); box-shadow: 0 6px 20px rgba(201, 146, 42, .25); }
.badge-pick { background: var(--guide-red); border-color: var(--guide-red); color: #fff; }
.advice-header .badge-pick, .tour-module .badge-pick { background: var(--guide-gold-soft); border-color: var(--guide-gold); color: #6d5320; }
.pick-by { font-size: .84rem; color: var(--guide-ink-soft); margin: .2rem 0; }
.pick-by strong { color: var(--guide-ink); font-weight: 600; }
.badge-near { background: var(--guide-gold-soft); border-color: var(--guide-gold); color: #6d5320; }
.btn-map { border-color: var(--guide-gold-bright); }
.near-note { border-left: 3px solid var(--guide-gold-bright); padding-left: .7rem; margin: .5rem 0 1rem; }

@media (min-width: 720px) {
  h1 { font-size: 2.1rem; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card a.card-link { grid-template-columns: 120px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Spot photos and placeholders. The placeholder is always underneath the photo. */
.thumb-col { display: block; min-width: 0; }
.card-thumb.placeholder { position: relative; overflow: hidden; flex-direction: column; gap: .15rem; background: var(--ph-bg, var(--guide-gold-soft)); color: var(--ph-fg, var(--guide-gold)); }
.card-thumb.placeholder .ph-icon { font-size: 1.7rem; line-height: 1; }
.card-thumb.placeholder .ph-label { font-size: .68rem; letter-spacing: .04em; }
.card-thumb.placeholder .guide-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-food { --ph-bg: #f6e3d6; --ph-fg: #9a4a22; }
.cat-cafe_sweets { --ph-bg: #efe4d8; --ph-fg: #6e4b2e; }
.cat-sightseeing { --ph-bg: #e1ebe0; --ph-fg: #2f6b46; }
.cat-night { --ph-bg: #dfe0ee; --ph-fg: #3d3f78; }
.cat-shopping { --ph-bg: #f1dfe6; --ph-fg: #8a3a5c; }
.photo-credit { display: block; margin-top: .2rem; font-size: .62rem; line-height: 1.25; color: var(--guide-ink-faint); overflow-wrap: anywhere; }
.photo-credit a { color: inherit; }
.detail-photo { margin: 0 0 1rem; }
.detail-photo .card-thumb.big { width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 320px; border-radius: var(--guide-radius); }
.detail-photo .card-thumb.big .ph-icon { font-size: 3rem; }
.detail-photo .photo-credit { font-size: .75rem; }

/* "I just finished a tour" */
.after-tour { margin: .8rem 0; border: 1px solid var(--guide-line); border-radius: var(--guide-radius); background: var(--guide-card); padding: .2rem .8rem; }
.after-tour summary { cursor: pointer; font-weight: 600; min-height: var(--guide-tap); display: flex; align-items: center; }
.after-tour .chips { margin-bottom: .7rem; }
.after-note { margin: .8rem 0; padding: .8rem; border-left: 4px solid var(--guide-red); background: var(--guide-gold-soft); border-radius: 0 var(--guide-radius) var(--guide-radius) 0; }
.after-note p { margin: .3rem 0; }
.map-dot.is-end { background: #1b4f9c; width: 20px; height: 20px; border: 3px solid #fff; box-shadow: 0 0 0 2px #1b4f9c; }
