/* Clean video-site layout: large player, rounded corners, pill controls, no panel boxes. */
:root {
  --text: #0f0f0f;
  --muted: #606060;
  --line: #e5e5e5;
  --soft: #f2f2f2;
  --soft-hover: #e5e5e5;
  --accent: #d93a1e;
  --header: 56px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 15px/1.5 Roboto, Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}
a { color: var(--text); }
ul { list-style: none; margin: 0; padding: 0; }
h2, h3 { margin: 0; }
small { font-weight: normal; color: var(--muted); }
button, select, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #065fd4; outline-offset: 2px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  height: var(--header);
  background: #fff;
}
.header-row { display: flex; align-items: center; gap: 16px; height: 100%; padding: 0 24px; }
.logo { display: flex; flex: none; align-items: center; gap: 6px; text-decoration: none; }
.logo-mark { width: 26px; height: 26px; }
.logo-main { font-size: 19px; font-weight: 700; letter-spacing: -0.5px; }
.search { display: flex; flex: 1; max-width: 640px; min-width: 0; height: 40px; margin: 0 auto; }
.search input {
  flex: 1; min-width: 0;
  padding: 0 16px;
  border: 1px solid #ccc; border-right: 0;
  border-radius: 20px 0 0 20px;
  outline-offset: -2px;
  font-size: 16px;
}
.search input:focus { border-color: #065fd4; outline: 0; }
.search-btn {
  display: flex; flex: none; align-items: center; justify-content: center;
  width: 64px;
  border: 1px solid #ccc;
  border-radius: 0 20px 20px 0;
  background: #f8f8f8;
  cursor: pointer;
}
.search-btn:hover { background: var(--soft); }
.search-btn svg { width: 22px; height: 22px; }
.lang-select {
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: var(--soft);
  cursor: pointer;
}
.lang-select { flex: none; border-radius: 18px; height: 36px; padding: 0 10px; }
.lang-select:hover { background: var(--soft-hover); }

/* Intro: what the site is, and a first choice to make */
.intro { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; max-width: 1754px; margin: 4px auto 12px; padding: 10px 44px 10px 16px; border-radius: 12px; background: var(--soft); }
.intro-close {
  position: absolute; top: 8px; right: 8px;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: none;
  font-size: 20px;
  cursor: pointer;
}
.intro-close:hover { background: var(--soft-hover); }
.intro-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.intro-steps { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: 13px; padding: 0; list-style: none; counter-reset: step; color: var(--muted); }
.intro-steps li { counter-increment: step; }
.intro-steps li::before {
  content: counter(step);
  display: inline-block;
  width: 20px; height: 20px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 12px; font-weight: 700; line-height: 20px;
  text-align: center;
}
.intro-guide { margin: 0; font-size: 13px; }
.intro-guide a { font-weight: 500; }
body.view-plan .intro, body.view-courses .intro { display: none; }

/* Page */
.page { padding: 0 24px; }
/* Views: tabs with an underline under the open one */
.steps { display: flex; align-items: flex-end; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.step {
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px;
  margin-bottom: -1px;
  padding: 0 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.step:hover { color: var(--text); background: #fafafa; }
.step.is-active { border-bottom-color: var(--text); color: var(--text); font-weight: 700; }
.step-icon { flex: none; width: 20px; height: 20px; fill: currentColor; }
.step-count:not(:empty) { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.step-count:empty { display: none; }
.sample-bar { margin-left: auto; color: var(--muted); font-size: 12px; text-align: right; }
.notice { margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; background: #fff4e5; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 40%); gap: 20px; align-items: start; max-width: 1754px; margin: 0 auto; }
.col-main { min-width: 0; }
/* The map and list stay in view while the left column scrolls. */
.col-side {
  position: sticky; top: calc(var(--header) + 8px);
  display: flex; flex-direction: column; gap: 12px;
  height: calc(100vh - var(--header) - 20px);
  min-width: 0;
}
.panel { min-width: 0; }
.panel-title { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.panel-map { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.panel-map .panel-title { display: none; }
#map { height: 100%; min-height: 280px; border-radius: 12px; overflow: hidden; background: var(--soft); z-index: 0; }
.map-wrap { position: relative; flex: 1; min-height: 0; }
/* "Show shops in this area", once the visitor has moved the map. */
.area-search { position: absolute; top: 10px; left: 50%; z-index: 5; transform: translateX(-50%); }
body:not(.view-explore) .area-search, .is-drawing .area-search { display: none; }
.map-tools { position: absolute; top: 10px; right: 10px; z-index: 5; display: flex; gap: 6px; }
.map-tool {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.map-tool:hover { background: var(--soft); }
body.view-plan .map-tools, body.view-courses .map-tools { display: none; }
.is-drawing .map-tools { display: none; }
.lasso-overlay {
  position: absolute; inset: 0; z-index: 6;
  border-radius: 12px;
  box-shadow: inset 0 0 0 3px var(--text);
  cursor: crosshair;
  touch-action: none;  /* The finger draws here instead of scrolling the page. */
}
.lasso-hint {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 6px 6px 12px;
  border-radius: 20px;
  background: rgba(15, 15, 15, .85);
  color: #fff;
  font-size: 13px;
  pointer-events: none;
}
.lasso-hint .map-tool { flex: none; color: var(--text); pointer-events: auto; }
.panel-list { min-width: 0; }
.more-row { margin: 8px 0 24px; text-align: center; }
.link-btn { padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 500; text-decoration: underline; cursor: pointer; }
.map-error { padding: 20px; color: #b00020; }

/* Filter panel: a left column on wide screens, a drawer opened by a button on narrower ones. */
/* Filters: where, what, quick switches, then what is switched on */
.filter-bar { padding: 0 0 4px; }
body:not(.view-explore) .filter-bar { display: none; }
.fb-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.fb-row::-webkit-scrollbar { display: none; }
.fb-top { justify-content: space-between; }
/* City: a segmented control, one city at a time */
.seg { display: inline-flex; flex: none; padding: 3px; border-radius: 10px; background: var(--soft); }
.seg-btn { padding: 6px 14px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-weight: 500; white-space: nowrap; cursor: pointer; }
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed="true"] { background: #fff; color: var(--text); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
/* Quick switches and the drawer button */
.fb-actions { display: flex; flex: none; gap: 8px; }
.tchip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid #d3d3d3; border-radius: 18px; background: #fff; font-weight: 500; white-space: nowrap; cursor: pointer; }
.tchip svg { width: 18px; height: 18px; fill: currentColor; }
.tchip:hover { background: var(--soft); }
.tchip[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: #fff; }
.fb-filters .filter-count:not(:empty) { margin-left: 0; }
/* Food: pills with an icon, several at once */
.food-chip { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 10px; border: 1px solid #e3e3e3; border-radius: 19px; background: #fff; font-weight: 500; white-space: nowrap; cursor: pointer; }
.food-chip:hover { background: var(--soft); }
.food-chip[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: #fff; }
.food-icon { font-size: 18px; line-height: 1; }
/* Applied filters, each removable */
.fb-applied { gap: 6px; }
.applied-chip { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 12px; border: 0; border-radius: 15px; background: #e8f0fe; color: #174ea6; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.applied-chip span { font-size: 16px; line-height: 1; }
.applied-chip:hover { background: #d2e3fc; }
.fb-applied .link-btn { flex: none; font-size: 13px; white-space: nowrap; }
.filter-count:not(:empty) { display: inline-block; min-width: 18px; margin-left: 2px; padding: 0 5px; border-radius: 9px; background: var(--text); color: #fff; font-size: 12px; line-height: 18px; text-align: center; }
.filter-panel {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 1200;
  width: min(340px, 88vw);
  overflow-y: auto;
  padding: 16px;
  background: #fff;
  box-shadow: 2px 0 16px rgba(0, 0, 0, .25);
  transform: translateX(-105%);
  visibility: hidden;
  transition: transform .18s ease-out, visibility 0s linear .18s;
}
/* Visible at once when opening, so the panel can take keyboard focus straight away. */
.filter-panel.is-open { transform: none; visibility: visible; transition: transform .18s ease-out, visibility 0s; }
.filter-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; }
.filter-head h2 { font-size: 16px; font-weight: 700; }
.filter-clear { padding: 2px 8px; border: 0; border-radius: 8px; background: none; font-size: 13px; font-weight: 500; cursor: pointer; }
.filter-clear:hover { background: var(--soft); }
.filter-group { margin: 12px 0 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); }
.filter-group legend { float: left; width: 100%; margin-bottom: 4px; padding: 0; font-size: 13px; font-weight: 700; }
.filter-option { display: flex; clear: both; align-items: center; gap: 8px; padding: 4px 0; border-radius: 6px; cursor: pointer; }
.filter-option:hover { background: var(--soft); }
.filter-sub { clear: both; margin: 6px 0 2px; color: var(--muted); font-size: 12px; }
.filter-option input { flex: none; width: 17px; height: 17px; margin: 0; accent-color: var(--text); cursor: pointer; }
.filter-done { display: flex; width: 100%; margin-top: 16px; }
.filter-backdrop { display: none; }
.filter-backdrop.is-open { position: fixed; inset: 0; z-index: 1100; display: block; background: rgba(0, 0, 0, .45); }
body.view-plan .layout, body.view-courses .layout { grid-template-columns: minmax(0, 1fr) 402px; }

body:not(.view-explore) .panel-list,
body:not(.view-plan) .panel-plan,
body:not(.view-courses) .panel-courses { display: none; }

/* Courses */
.courses-intro { margin: 0 0 12px; color: var(--muted); }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.course-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 0; border-radius: 12px; background: var(--soft); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.course-card:hover { background: var(--soft-hover); }
.course-city { color: var(--muted); font-size: 12px; }
.course-title { font-size: 16px; font-weight: 700; }
.course-text { font-size: 13px; }
.course-meta { margin-top: 4px; color: var(--muted); font-size: 12px; }
.course-heading { margin: 12px 0 4px; font-size: 20px; }
.course-lead { margin: 0 0 6px; }
.course-note { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: #fff4e5; font-size: 13px; }
.course-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.course-stops { margin: 0; padding: 0; list-style: none; }
.course-stop { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.course-num { flex: none; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 13px; }
.course-body { flex: 1; min-width: 0; }
.course-time { color: var(--accent); font-weight: 700; font-size: 13px; }
.course-group { padding: 14px 0 4px; font-weight: 700; }
.btn-icon.is-added { background: var(--text); color: #fff; }

/* Map markers */
.pin-dot {
  width: 14px; height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #5f6b7a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.pin-dot.cat-ramen, .cat-dot.cat-ramen { background: #d93a1e; }
.pin-dot.cat-sushi, .cat-dot.cat-sushi { background: #1a73b8; }
.pin-dot.cat-izakaya, .cat-dot.cat-izakaya { background: #e08600; }
.pin-dot.cat-okonomiyaki, .cat-dot.cat-okonomiyaki { background: #7b4a2a; }
.pin-dot.cat-takoyaki, .cat-dot.cat-takoyaki { background: #8e44ad; }
.pin-dot { transition: transform .12s; }
.pin-dot.is-selected { transform: scale(1.5); box-shadow: 0 0 0 2px #0f0f0f; }
.pin-dot.is-hover { transform: scale(1.9); box-shadow: 0 0 0 3px rgba(15, 15, 15, .35); }
.cat-dot { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; vertical-align: 1px; }
.pin-num {
  width: 24px; height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  font: 700 12px/20px Arial, sans-serif;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
.pin-num.is-selected { box-shadow: 0 0 0 3px rgba(15, 15, 15, .35); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 18px;
  background: var(--soft);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { background: var(--soft-hover); }
.btn:disabled { color: #aaa; background: #f8f8f8; cursor: default; }
.btn-add { background: var(--text); color: #fff; }
.btn-add:hover { background: #272727; }
.btn-icon { width: 36px; padding: 0; }

/* Player */
.video-box { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.video-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.shop-title { margin: 14px 0 0; font-size: 24px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.shop-sub { margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; }
.shop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 14px 0 0; }
.fact { padding: 10px 12px; border-radius: 10px; background: var(--soft); }
.fact dt { color: var(--muted); font-size: 12px; }
.fact dd { margin: 1px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.row-hours { display: none; }
.shop-tip { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff4e5; }
.video-credit { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.video-credit .channel-name { font-size: 14px; }
.channel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.channel-avatar {
  display: flex; flex: none; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #5f6b7a;
  color: #fff;
  font-size: 16px; font-weight: 500;
}
.channel-text { min-width: 0; }
.channel-name { display: block; font-weight: 500; overflow-wrap: anywhere; }
.channel-note { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.channel-note a { color: inherit; font-weight: 500; }
.channel-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-box { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--soft); }
.shop-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.shop-links { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-review { background: #fff; }
.btn-review:hover { background: var(--soft-hover); }
.shop-guide { margin: 10px 0 0; font-size: 14px; }
.btn-small { min-height: 32px; padding: 0 12px; font-size: 13px; }

/* One shop, full screen, over any view */
/* Starts under the header (--shop-top, set by app.js), so the header stays on screen. */
.shop-view { position: fixed; top: var(--shop-top, var(--header)); right: 0; bottom: 0; left: 0; z-index: 1050; overflow-y: auto; background: #fff; }
body.shop-is-open { overflow: hidden; }
.shop-view-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; height: var(--header); padding: 0 24px; background: #fff; }
.shop-view-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; max-width: 1400px; margin: 0 auto; padding: 0 24px 48px; }
.shop-side { min-width: 0; }
.shop-map { height: 260px; border-radius: 12px; overflow: hidden; background: var(--soft); z-index: 0; }
.near-title { margin: 16px 0 8px; font-size: 16px; font-weight: 700; }
.near-open { display: flex; gap: 10px; width: 100%; margin-bottom: 8px; padding: 6px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; }
.near-open:hover { background: var(--soft); }
.near-thumb { flex: none; width: 140px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--soft); }
.near-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.near-text { display: flex; flex-direction: column; min-width: 0; }
.near-name { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }

/* Large Japanese card to show to staff or a taxi driver */
.show-dialog { width: min(640px, calc(100vw - 24px)); padding: 24px; border: 0; border-radius: 16px; color: var(--text); text-align: center; }
.show-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.show-dialog p { margin: 0; }
.show-hint { color: var(--muted); font-size: 14px; }
.show-phrase { margin-top: 16px !important; font-size: 20px; }
.show-name { margin-top: 16px !important; font-size: clamp(30px, 8vw, 44px); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.show-address { margin-top: 16px !important; font-size: clamp(20px, 5vw, 26px); line-height: 1.4; overflow-wrap: anywhere; }
.show-access { margin-top: 8px !important; color: var(--muted); font-size: 18px; }
.show-dialog .btn { margin-top: 24px; min-width: 140px; }
.shop-name { font-size: 15px; font-weight: 700; }
.shop-name-ja { margin-left: 8px; color: var(--muted); font-size: 13px; font-weight: 400; }
.shop-details { margin-top: 12px; }
.shop-details summary { font-weight: 500; cursor: pointer; }
.info-table { width: 100%; margin-top: 6px; border-collapse: collapse; }
.info-table th, .info-table td { padding: 4px 0; text-align: left; vertical-align: top; }
.info-table th { width: 110px; padding-right: 12px; color: var(--muted); font-weight: 400; }
.check-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.check-note a { font-weight: 500; }

/* Filters + list */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; }
.chip { padding: 6px 12px; border: 0; border-radius: 8px; background: var(--soft); color: var(--text); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--text); color: #fff; }
.sort { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.sort select { padding: 4px 8px; border: 1px solid #d3d3d3; border-radius: 8px; background: #fff; color: var(--text); font: inherit; }
.sort-status { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.sort-status:empty { display: none; }
.open-state { color: var(--muted); }
.open-state.is-open { color: #1a7f37; }
.open-state.is-open::before { content: "● "; }
.shop-open { margin-top: 6px; font-size: 14px; font-weight: 500; }
.saved-mark { color: var(--accent); }
.btn.is-saved { color: var(--accent); }
.filter-note { margin: 12px 0; color: var(--muted); font-size: 12px; }
.pin-here { width: 18px; height: 18px; border: 3px solid #fff; border-radius: 50%; background: #1a73e8; box-shadow: 0 0 0 6px rgba(26, 115, 232, 0.25), 0 1px 4px rgba(0, 0, 0, 0.4); }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px 16px; }
.video-card { min-width: 0; padding: 0 0 6px; border-radius: 14px; }
.video-card.is-selected { background: var(--soft); box-shadow: 0 0 0 6px var(--soft); }
.video-card .video-text { padding: 10px 4px 0; }
.video-grid .empty { grid-column: 1 / -1; }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--soft); }
.thumb-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.thumb-open img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-add {
  position: absolute; right: 6px; bottom: 6px;
  width: 34px; height: 34px; padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .78);
  color: #fff;
  font: 400 22px/32px Arial, sans-serif;
  cursor: pointer;
}
.thumb-add:hover { background: #000; }
.thumb-add.is-added { background: #fff; color: var(--text); font-size: 15px; font-weight: 700; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.video-text { min-width: 0; padding-top: 1px; }
.video-title { display: block; padding: 0; border: 0; background: none; font-size: 16px; font-weight: 700; line-height: 1.35; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.video-title:hover { text-decoration: underline; }
.video-meta {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.video-facts { -webkit-line-clamp: 1; color: #303030; font-size: 13px; }
.video-from { -webkit-line-clamp: 1; }
.empty { padding: 16px 4px; color: var(--muted); }

/* Affiliate links (ads.js): plain, labelled PR, never over a video or the map */
.ad-box { margin: 20px 0; padding: 12px 14px; border-radius: 12px; background: #f7f4ee; }
.ad-head { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.pr-tag { padding: 0 6px; border: 1px solid #b8b8b8; border-radius: 4px; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 18px; letter-spacing: .5px; }
.ad-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #e6dfd2; text-decoration: none; }
.ad-row:first-of-type { border-top: 0; }
.ad-row:hover .ad-title { text-decoration: underline; }
.ad-title { display: block; font-weight: 700; }
.ad-text { display: block; color: var(--muted); font-size: 13px; }
.ad-go { flex: none; font-weight: 700; }
.ad-note { margin: 6px 0 0; color: var(--muted); font-size: 11px; }

/* Plan */
.trip-start { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 12px; font-weight: 500; }
.trip-start input { padding: 6px 8px; border: 1px solid #d3d3d3; border-radius: 8px; font: inherit; }
.trip-start small { flex-basis: 100%; }
.plan-warn { margin-top: 2px; color: #b3261e; font-size: 13px; font-weight: 500; }
.plan-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.day { margin-bottom: 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; }
.day-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.day-name { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.day-swatch { width: 12px; height: 12px; border-radius: 50%; }
.day-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.day-empty { padding-top: 8px; color: var(--muted); }
.plan-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.plan-num { flex: none; width: 18px; color: var(--muted); font-weight: 700; text-align: right; }
.plan-main { flex: 1; min-width: 0; }
.plan-shop { padding: 0; border: 0; background: none; font-weight: 700; text-align: left; cursor: pointer; }
.plan-shop:hover { text-decoration: underline; }
.plan-meta { margin-top: 1px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.plan-controls { display: flex; flex: none; align-items: center; gap: 4px; }
.plan-controls select { height: 36px; padding: 0 6px; border: 0; border-radius: 18px; background: var(--soft); cursor: pointer; }
.share-box { padding: 16px; border-radius: 12px; background: var(--soft); }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; padding: 0 14px; border: 1px solid #ccc; border-radius: 18px; background: #fff; font-size: 13px; }
.share-help { margin: 8px 0; color: var(--muted); font-size: 13px; }
.share-qr svg { display: block; width: 140px; height: 140px; border-radius: 8px; background: #fff; }

.site-footer { padding: 24px 0; color: var(--muted); font-size: 12px; }
.site-footer a { color: var(--muted); }

/* About page */
html[lang="zh-Hans"] body { font-family: Roboto, Arial, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
html[lang="ko"] body { font-family: Roboto, Arial, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; word-break: keep-all; }
html[lang="zh-Hant"] body { font-family: Roboto, Arial, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif; }
[lang="ja"] { font-family: Roboto, Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif; }
.guide-lang { font-size: 13px; color: var(--muted); }
.about { max-width: 700px; margin: 0 auto; padding: 8px 24px 40px; line-height: 1.65; }
.about h1 { margin: 8px 0 12px; font-size: 24px; }
.about h2 { margin: 20px 0 4px; font-size: 16px; }
.about p { margin: 0 0 8px; }
.about ul { padding-left: 18px; list-style: disc; }
.about hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.about ol { padding-left: 22px; }
.about li { margin-bottom: 4px; }
.about a { font-weight: 500; }
.about .btn { text-decoration: none; }
.about h2[id] { scroll-margin-top: calc(var(--header) + 8px); }
.guide-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.guide-nav a { padding: 5px 12px; border-radius: 8px; background: var(--soft); text-decoration: none; }
.guide-nav a:hover { background: var(--soft-hover); }
.guide-nav a[aria-current] { background: var(--text); color: #fff; }
.phrase-table { overflow-x: auto; }
.phrase-table table { width: 100%; min-width: 500px; border-collapse: collapse; }
.phrase-table th, .phrase-table td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.phrase-table th { color: var(--muted); font-weight: 500; }
.guide-back { margin-top: 24px !important; }

/* Shop, city and area pages (tools/build_pages.py) */
.about.page-wide { max-width: 860px; }
.crumbs { margin: 12px 0 4px; color: var(--muted); font-size: 13px; }
.crumbs a { font-weight: 400; color: var(--muted); }
.page-ja { color: var(--muted); font-size: .7em; font-weight: 400; }
.page-sub { color: var(--muted); }
.page-video { position: relative; aspect-ratio: 16 / 9; margin: 12px 0 4px; border-radius: 12px; overflow: hidden; background: #000; }
.page-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.page-credit { color: var(--muted); font-size: 13px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 !important; }
.page-table { margin: 12px 0; }
.page-list { margin: 0; padding: 0 !important; list-style: none !important; }
.page-card { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.page-thumb { flex: none; width: 160px; height: 90px; border-radius: 8px; overflow: hidden; background: var(--soft); }
.page-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-card-title { font-size: 15px; }
.page-meta { color: var(--muted); font-size: 13px; line-height: 1.5; }
.page-links { font-size: 14px; }
.page-footer { max-width: 860px; margin: 0 auto; padding: 24px; }
@media (max-width: 767px) {
  .page-thumb { width: 120px; height: 68px; }
  .about { padding-left: 16px; padding-right: 16px; }
}

.leaflet-container { font: inherit; }
.leaflet-container .leaflet-control-attribution { font-size: 10px; }

/* Narrower laptops */
@media (max-width: 1199px) {
  .layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
  body.view-plan .layout, body.view-courses .layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 960px) {
  .shop-view-body { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .page, .header-row { padding-left: 16px; padding-right: 16px; }
  .sample-bar { display: none; }
}

/* Phones: one column, view switch fixed to the bottom */
@media (max-width: 767px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .site-header { position: static; height: auto; }
  .header-row { flex-wrap: wrap; gap: 8px 10px; justify-content: space-between; height: auto; padding: 8px 12px; }
  .search { order: 3; flex-basis: 100%; max-width: none; height: 40px; }
  .search-btn { width: 56px; }
  .page { padding: 0; }
  .notice { margin: 8px 12px; }

  .steps {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    gap: 0;
    margin: 0;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-bottom: 0;
    background: #fff;
  }
  .step { position: relative; flex: 1; flex-direction: column; justify-content: center; gap: 2px; height: 52px; margin: 0; padding: 0 2px; border-bottom: 0; font-size: 11px; }
  .step:hover { background: none; }
  .step.is-active { color: var(--text); }
  .step-icon { width: 24px; height: 24px; }
  .step-count:not(:empty) { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; padding: 0 5px; font-size: 11px; line-height: 18px; }
  .fb-top { flex-wrap: wrap; justify-content: flex-start; gap: 8px; overflow: visible; }
  .fb-actions { order: -1; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg-btn { padding: 6px 12px; }
  .intro { margin: 0 12px 8px; padding: 10px 36px 10px 12px; }
  .intro-title { font-size: 16px; }
  .intro-steps { display: none; }

  .layout, body.view-plan .layout, body.view-courses .layout { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .col-main, .col-side { display: contents; }
  .filter-bar { padding: 0 12px 2px; }
  /* Map first, kept at the top while the video cards scroll under it. */
  .panel-map { order: 1; flex: none; }
  body.view-explore .panel-map { position: sticky; top: 0; z-index: 20; padding: 0 0 8px; background: #fff; }
  .panel-list { order: 2; padding: 4px 12px 0; }
  .panel-plan, .panel-courses { order: 2; padding: 12px 12px 0; }
  .map-wrap { flex: none; }
  #map { height: 30vh; min-height: 200px; border-radius: 0; }
  .is-drawing #map { height: 60vh; }
  body.view-plan #map, body.view-courses #map { height: 240px; border-radius: 0; }
  .lasso-overlay { border-radius: 0; }
  .step { font-size: 13px; }
  .video-grid { grid-template-columns: 1fr; gap: 18px; }
  .video-card { margin: 0 -12px; border-radius: 0; }
  .video-card.is-selected { box-shadow: none; }
  .video-card .thumb { border-radius: 0; }
  .video-card .video-text { padding: 8px 12px 0; }

  .shop-view-top { padding: 0 12px; }
  .shop-view-body { padding: 0 0 48px; gap: 12px; }
  .shop-side { padding: 0 12px; }
  .video-box { border-radius: 0; }
  .player-body { padding: 0 12px 12px; }
  .shop-title { font-size: 20px; margin-top: 10px; }
  .fact-hours { display: none; }
  .row-hours { display: table-row; }
  .facts { grid-template-columns: 1fr; gap: 6px; margin-top: 10px; }
  .fact { padding: 8px 10px; }
  .shop-actions .btn { flex: 1 1 auto; }
  .thumb-add { width: 40px; height: 40px; font-size: 24px; line-height: 38px; }
  .thumb-add.is-added { font-size: 16px; }
  .plan-row { flex-wrap: wrap; }
  .plan-controls { width: 100%; justify-content: flex-end; }
  .btn { min-height: 40px; }
  .btn-icon { width: 40px; }
  .site-footer { padding: 16px 12px; }
}
