:root {
  color-scheme: light;
  --ink: #2e2a27;
  --muted: #766f69;
  --paper: #fff8eb;
  --paper-deep: #f7ead5;
  --white: #fffdf8;
  --sumi: #3b3a34;
  --matcha: #6d8b5f;
  --ume: #d86f6f;
  --sora: #5e9ab8;
  --mikan: #e4a34f;
  --fuji: #8d79a7;
  --line: #dac8aa;
  --shadow: 0 18px 50px rgba(73, 50, 25, 0.13);
  --radius: 8px;
  --font-body: "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-round: "Kosugi Maru", "Noto Sans TC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 18% 11%, rgba(216, 111, 111, 0.14), transparent 24rem),
    radial-gradient(circle at 88% 12%, rgba(94, 154, 184, 0.16), transparent 22rem),
    linear-gradient(180deg, #fffaf0 0%, #fff5df 42%, #f6ead7 100%);
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.paper-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.43;
  background-image:
    linear-gradient(90deg, rgba(99, 77, 49, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(99, 77, 49, 0.035) 1px, transparent 1px);
  background-size: 18px 18px, 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 92%);
}

.app-header {
  padding: 18px clamp(16px, 4vw, 48px) 0;
}

.topbar {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sumi);
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: var(--font-round);
  background: var(--ume);
  border: 2px solid var(--ink);
  border-radius: 50% 45% 50% 48%;
  box-shadow: 3px 4px 0 rgba(46, 42, 39, 0.14);
}

.trip-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.84rem;
}

.trip-meta span,
.status-pill,
.section-label {
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.74);
}

.trip-meta span {
  padding: 6px 10px;
}

.hero {
  width: min(1160px, 100%);
  min-height: min(560px, calc(100vh - 78px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(20px, 4vw, 54px);
  align-items: center;
  padding: clamp(34px, 6vw, 78px) 0 36px;
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--ume);
  font-family: var(--font-round);
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--sumi);
  letter-spacing: 0;
}

h1 {
  max-width: 620px;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  line-height: 1.05;
  font-weight: 900;
}

.hero-copy p:last-child {
  max-width: 34rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.17rem);
  line-height: 1.9;
}

.hero-illustration {
  position: relative;
  min-height: 320px;
}

.hero-illustration img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  border: 2px solid rgba(46, 42, 39, 0.12);
  border-radius: var(--radius);
  filter: drop-shadow(0 22px 32px rgba(82, 57, 31, 0.15));
}

.layout {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto 64px;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.trip-list,
.content-panel {
  background: rgba(255, 253, 248, 0.82);
  border: 2px solid rgba(46, 42, 39, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.trip-list {
  position: sticky;
  top: 16px;
  padding: 16px;
}

.section-label {
  display: inline-flex;
  padding: 5px 11px;
  color: var(--muted);
  font-size: 0.82rem;
}

.itinerary-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.itinerary-button {
  width: 100%;
  min-height: 74px;
  padding: 12px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  text-align: left;
  background: #fffaf1;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.itinerary-button.is-active {
  border-color: var(--ink);
  box-shadow: 3px 4px 0 rgba(46, 42, 39, 0.13);
  background: #fff7e8;
}

.itinerary-button:focus-visible,
.tab:focus-visible,
.marker:focus-visible,
.svg-marker:focus-visible,
.card-action:focus-visible,
.dialog-close:focus-visible {
  outline: 3px solid rgba(94, 154, 184, 0.55);
  outline-offset: 3px;
}

.itinerary-icon {
  width: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: var(--font-round);
  font-weight: 700;
  border: 1.5px solid var(--ink);
  border-radius: 50% 46% 48% 50%;
  background: var(--matcha);
}

.itinerary-button:nth-child(2n) .itinerary-icon {
  background: var(--sora);
}

.itinerary-button strong {
  display: block;
  font-size: 0.98rem;
}

.itinerary-button span:last-child {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.content-panel {
  padding: clamp(16px, 3vw, 26px);
}

.panel-head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.panel-head h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.2;
}

.status-pill {
  flex: 0 0 auto;
  padding: 7px 12px;
  color: var(--matcha);
  font-weight: 700;
  font-size: 0.88rem;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.stat {
  min-height: 82px;
  padding: 13px;
  background: #fff8ea;
  border: 1.5px dashed rgba(46, 42, 39, 0.22);
  border-radius: var(--radius);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.stat strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.tabs {
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 24px;
}

.tab {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: #fffaf2;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.tab.is-active {
  color: var(--ink);
  border-color: var(--ink);
  background: #fff2de;
  box-shadow: 2px 3px 0 rgba(46, 42, 39, 0.12);
}

.tab-icon {
  width: 18px;
  height: 18px;
  position: relative;
  flex: 0 0 auto;
}

.tab-icon::before,
.tab-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.route-icon::before {
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.route-icon::after {
  top: 4px;
  bottom: 4px;
  left: 7px;
  width: 2px;
  background: currentColor;
  box-shadow: 5px 0 0 currentColor;
}

.rail-icon::before {
  inset: 1px 3px 4px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.rail-icon::after {
  left: 3px;
  right: 3px;
  bottom: 0;
  height: 2px;
  background: currentColor;
  box-shadow: 4px -8px 0 -1px currentColor, 9px -8px 0 -1px currentColor;
}

.food-icon::before {
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 9px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

.food-icon::after {
  right: 2px;
  top: 0;
  width: 2px;
  height: 15px;
  background: currentColor;
  transform: rotate(28deg);
  box-shadow: -5px 2px 0 currentColor;
}

.camera-icon::before {
  left: 2px;
  right: 2px;
  bottom: 3px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.camera-icon::after {
  left: 7px;
  top: 8px;
  width: 6px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: -2px -8px 0 -3px currentColor;
}

.route-icon::before,
.rail-icon::before,
.food-icon::before,
.camera-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
}

.route-icon::before {
  border-radius: 50%;
}

.route-icon::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 2px;
  left: -4px;
  top: 8px;
  background: currentColor;
  transform: rotate(-35deg);
}

.rail-icon::before {
  border-radius: 4px;
}

.rail-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: -1px;
  height: 2px;
  background: currentColor;
}

.food-icon::before {
  border-radius: 50% 50% 44% 44%;
}

.camera-icon::before {
  border-radius: 4px;
}

.camera-icon::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.overview-stack {
  display: grid;
  gap: 16px;
}

.sketch-map,
.info-stack,
.route-card,
.empty-state,
.note-block {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf2;
}

.sketch-map {
  position: relative;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.map-point-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: #fffaf2;
  border-top: 1.5px solid var(--line);
}

.geo-map {
  position: relative;
  width: 100%;
  aspect-ratio: 900 / 620;
  min-height: 390px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(46, 42, 39, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(46, 42, 39, 0.03) 1px, transparent 1px),
    #fff4df;
  background-size: 28px 28px, 28px 28px, auto;
  touch-action: auto;
}

.geo-map.is-large {
  min-height: 560px;
}

.map-surface {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
}

.geo-map-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bay-shape {
  fill: rgba(94, 154, 184, 0.2);
  stroke: rgba(94, 154, 184, 0.55);
  stroke-width: 4;
  stroke-linejoin: round;
}

.land-shape {
  fill: #f8dfb8;
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linejoin: round;
}

.land-shape.east {
  fill: #f3d69c;
}

.river-line,
.water-line {
  fill: none;
  stroke: #8bc1cf;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 2 18;
}

.skyliner-main {
  fill: none;
  stroke: var(--ume);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 30 18;
}

.local-main {
  fill: none;
  stroke: var(--sora);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 18 12;
}

.taxi-line {
  fill: none;
  stroke: var(--mikan);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
}

.map-train rect,
.airport-doodle path,
.hotel-doodle path,
.hotel-doodle rect,
.market-doodle path,
.station-block rect,
.station-block path {
  fill: var(--white);
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-train circle {
  fill: var(--ink);
}

.station-block rect {
  fill: #fff7e8;
}

.station-block path {
  fill: none;
  stroke-width: 3;
}

.ueno-inset rect {
  fill: rgba(255, 253, 248, 0.78);
  stroke: var(--ink);
  stroke-width: 3;
}

.ueno-inset path {
  fill: none;
  stroke: rgba(46, 42, 39, 0.26);
  stroke-width: 7;
  stroke-linecap: round;
}

.ueno-inset text {
  fill: var(--sumi);
  font: 700 20px var(--font-round);
}

.park-shape {
  fill: rgba(109, 139, 95, 0.18);
  stroke: rgba(109, 139, 95, 0.52);
  stroke-width: 4;
}

.road {
  fill: none;
  stroke-linecap: round;
}

.major-road {
  stroke: rgba(46, 42, 39, 0.28);
  stroke-width: 15;
}

.minor-road {
  stroke: rgba(46, 42, 39, 0.16);
  stroke-width: 9;
}

.rail-track {
  fill: none;
  stroke: rgba(46, 42, 39, 0.34);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 20 12;
}

.ameyoko-street {
  fill: none;
  stroke: var(--ume);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-dasharray: 18 10;
}

.walk-route {
  fill: none;
  stroke: var(--sora);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 10 12;
}

.return-route {
  fill: none;
  stroke: var(--matcha);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
}

.map-labels text {
  fill: rgba(46, 42, 39, 0.58);
  font: 700 18px var(--font-round);
}

.geo-map-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.84);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.82rem;
}

.geo-map-caption strong {
  color: var(--ink);
  white-space: nowrap;
}

.svg-marker {
  position: absolute;
  z-index: 5;
  width: auto;
  height: auto;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  transform: translate(-50%, -74%);
  cursor: pointer;
}

.svg-marker span {
  --marker-size: 36px;
  position: relative;
  min-width: var(--marker-size);
  height: var(--marker-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  font-family: var(--font-round);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 4px 0 rgba(46, 42, 39, 0.12);
}

.svg-marker span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 11px;
  height: 11px;
  background: inherit;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateX(-50%) rotate(45deg);
}

.svg-marker[data-tone="ume"] span {
  background: #ffe6de;
}

.svg-marker[data-tone="sora"] span {
  background: #e4f3f7;
}

.svg-marker[data-tone="matcha"] span {
  background: #edf4e5;
}

.svg-marker[data-tone="mikan"] span {
  background: #fff0d1;
}

.svg-marker[data-tone="fuji"] span {
  background: #eee8f6;
}

.inset-marker-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.inset-marker-layer .svg-marker {
  pointer-events: auto;
}

.map-canvas {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(132deg, transparent 0 55%, rgba(109, 139, 95, 0.14) 55% 57%, transparent 57%),
    linear-gradient(24deg, transparent 0 42%, rgba(94, 154, 184, 0.18) 42% 45%, transparent 45%),
    #fff4df;
}

.route-stroke {
  position: absolute;
  left: 11%;
  right: 11%;
  top: 42%;
  height: 9px;
  background: repeating-linear-gradient(90deg, var(--ume), var(--ume) 28px, transparent 28px, transparent 42px);
  border-radius: 99px;
  transform: rotate(-18deg);
}

.route-stroke.alt {
  top: 57%;
  left: 24%;
  right: 16%;
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--sora), var(--sora) 18px, transparent 18px, transparent 30px);
  transform: rotate(-10deg);
}

.station-label {
  position: absolute;
  min-width: 70px;
  padding: 7px 10px;
  color: var(--muted);
  font-family: var(--font-round);
  text-align: center;
  background: rgba(255, 253, 248, 0.82);
  border: 1.5px solid var(--line);
  border-radius: 999px;
}

.station-label.nrt {
  left: 8%;
  bottom: 19%;
}

.station-label.ueno {
  right: 7%;
  top: 13%;
}

.station-label.nippori {
  right: 31%;
  top: 29%;
}

.station-label.okachi {
  right: 23%;
  bottom: 21%;
}

.marker {
  position: absolute;
  width: 54px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-weight: 900;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 50% 46% 50% 44%;
  box-shadow: 4px 5px 0 rgba(46, 42, 39, 0.12);
  cursor: pointer;
}

.marker::after {
  content: "";
  position: absolute;
  bottom: -10px;
  width: 13px;
  height: 13px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: inherit;
  transform: rotate(45deg);
}

.marker[data-tone="ume"] {
  background: #ffe6de;
}

.marker[data-tone="sora"] {
  background: #e4f3f7;
}

.marker[data-tone="matcha"] {
  background: #edf4e5;
}

.marker[data-tone="mikan"] {
  background: #fff0d1;
}

.marker small {
  position: relative;
  z-index: 1;
  font-family: var(--font-round);
}

.marker.nrt {
  left: 12%;
  bottom: 31%;
}

.marker.exchange {
  left: 27%;
  top: 39%;
}

.marker.ueno {
  right: 18%;
  top: 25%;
}

.marker.hotel {
  right: 12%;
  bottom: 33%;
}

.mini-building {
  position: absolute;
  width: 88px;
  height: 82px;
  right: 9%;
  bottom: 12%;
  border: 2px solid var(--ink);
  border-radius: 8px 8px 2px 2px;
  background: #fffdf8;
  box-shadow: 4px 5px 0 rgba(46, 42, 39, 0.1);
}

.mini-building::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -30px;
  width: 48px;
  height: 48px;
  border-top: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
  background: #fffdf8;
  transform: rotate(45deg);
}

.mini-building::after {
  content: "";
  position: absolute;
  left: 32px;
  bottom: 0;
  width: 24px;
  height: 34px;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: #f8e3d2;
}

.info-stack {
  padding: 16px;
}

.info-stack h3,
.route-card h3,
.note-block h3 {
  font-size: 1.18rem;
  line-height: 1.35;
}

.timeline {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid rgba(218, 200, 170, 0.75);
  border-radius: var(--radius);
}

.step-number {
  width: 42px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--white);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
  margin-top: 0;
  border: 2px solid var(--ink);
  border-radius: 50% 46% 52% 48%;
  background: linear-gradient(145deg, var(--ume), var(--mikan));
  box-shadow: 3px 4px 0 rgba(46, 42, 39, 0.13);
}

.timeline-item strong {
  display: block;
}

.timeline-item > span:not(.step-number) {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.route-list {
  display: grid;
  gap: 14px;
}

.route-card {
  padding: 16px;
}

.route-card.featured {
  border-color: rgba(216, 111, 111, 0.54);
  background: #fff4e8;
}

.route-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.route-tag {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--ume);
  border-radius: 999px;
}

.route-card p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.route-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.route-sequence span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
}

.card-action {
  min-height: 42px;
  margin-top: 14px;
  padding: 9px 13px;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
}

.card-action:hover {
  background: rgba(255, 255, 255, 0.55);
}

.accordion {
  display: grid;
  gap: 10px;
}

.transport-notes {
  margin-top: 16px;
}

.accordion details {
  background: #fffaf2;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}

.accordion summary {
  min-height: 54px;
  padding: 14px 16px;
  font-weight: 700;
  cursor: pointer;
}

.accordion-content {
  padding: 0 16px 16px;
  color: var(--muted);
  line-height: 1.75;
}

.accordion-content ul {
  padding-left: 1.2rem;
}

.empty-state,
.note-block {
  padding: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.note-block {
  margin-top: 16px;
  background: #f7f3e6;
}

.food-note {
  margin-top: 0;
  margin-bottom: 16px;
}

.ameyoko-feature,
.place-card {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf2;
}

.ameyoko-feature {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  margin-bottom: 16px;
}

.ameyoko-feature p:not(.eyebrow),
.place-card p {
  color: var(--muted);
  line-height: 1.7;
}

.place-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.place-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.place-card.is-compact {
  min-height: 0;
}

.place-card.is-compact .place-photo {
  height: 96px;
}

.place-card.is-compact p {
  display: none;
}

.place-card.is-compact .card-action {
  min-height: 36px;
}

.place-card > div:not(.place-photo) {
  padding: 14px 14px 0;
}

.place-card h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  font-size: 1.08rem;
  line-height: 1.35;
}

.place-area {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  color: #4e6b46;
  font-size: 0.74rem;
  font-weight: 700;
  background: #edf4e5;
  border: 1px solid rgba(109, 139, 95, 0.35);
  border-radius: 999px;
}

.place-card .card-action {
  align-self: flex-start;
  margin: auto 14px 14px;
}

.detail-photo,
.place-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #f6ead7;
}

.detail-photo {
  height: 210px;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: -24px -24px 20px;
}

.place-photo {
  height: 150px;
}

.detail-photo img,
.place-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.detail-photo.is-contain,
.place-photo.is-contain {
  background: #ffe76b;
}

.detail-photo.is-contain img,
.place-photo.is-contain img {
  object-fit: contain;
  padding: 24px;
}

.detail-photo figcaption,
.place-photo figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  color: var(--white);
  font-size: 0.72rem;
  background: rgba(46, 42, 39, 0.58);
  border-radius: 999px;
}

.link-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.link-list a {
  color: #2d657c;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.detail-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 30px 80px rgba(46, 42, 39, 0.28);
  overflow: auto;
}

.detail-dialog.map-dialog {
  width: min(1040px, calc(100% - 28px));
}

.detail-dialog::backdrop {
  background: rgba(46, 42, 39, 0.32);
  backdrop-filter: blur(3px);
}

.dialog-close {
  position: sticky;
  float: right;
  right: 10px;
  top: 10px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 1.35rem;
  background: #fff7e8;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
}

.dialog-body {
  padding: 24px;
}

.map-dialog-body {
  padding: 22px;
}

.map-dialog-body .geo-map {
  margin-top: 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}

.dialog-body h3 {
  padding-right: 42px;
  font-size: 1.55rem;
}

.dialog-body p {
  color: var(--muted);
  line-height: 1.75;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.dialog-actions .card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  text-decoration: none;
}

.detail-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.detail-row span:first-child {
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero-illustration {
    min-height: 220px;
  }

  .layout,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .geo-map {
    min-height: 360px;
  }

  .geo-map.is-large {
    min-height: 480px;
  }

  .trip-list {
    position: static;
  }

  .itinerary-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-header {
    padding-inline: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    font-size: 0.96rem;
  }

  .trip-meta {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 26px;
  }

  h1 {
    font-size: clamp(2.05rem, 12vw, 3.15rem);
  }

  .layout {
    width: calc(100% - 20px);
    gap: 12px;
    margin-bottom: 32px;
  }

  .itinerary-list,
  .quick-stats,
  .tabs {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
  }

  .sketch-map {
    min-height: 0;
  }

  .geo-map {
    min-height: 340px;
  }

  .geo-map.is-large {
    min-height: 520px;
  }

  .geo-map-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .svg-marker span {
    max-width: 92px;
    height: 32px;
    padding: 0 8px;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .map-dialog-body {
    padding: 18px;
  }

  .marker {
    width: 48px;
  }

  .route-card-head {
    flex-direction: column;
  }

  .ameyoko-feature,
  .place-grid,
  .map-point-grid {
    grid-template-columns: 1fr;
  }

  .place-photo {
    height: 170px;
  }

  .route-sequence span {
    font-size: 0.86rem;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.tab .tab-icon::before,
.tab .tab-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.tab .route-icon::before {
  inset: 2px;
  width: auto;
  height: auto;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: transparent;
  transform: none;
  box-shadow: none;
}

.tab .route-icon::after {
  top: 4px;
  bottom: 4px;
  left: 7px;
  width: 2px;
  height: auto;
  background: currentColor;
  transform: none;
  box-shadow: 5px 0 0 currentColor;
}

.tab .rail-icon::before {
  inset: 1px 3px 4px;
  border: 2px solid currentColor;
  border-radius: 5px;
  background: transparent;
}

.tab .rail-icon::after {
  left: 3px;
  right: 3px;
  bottom: 0;
  top: auto;
  width: auto;
  height: 2px;
  background: currentColor;
  transform: none;
  box-shadow: 4px -8px 0 -1px currentColor, 9px -8px 0 -1px currentColor;
}

.tab .food-icon::before {
  left: 2px;
  right: 2px;
  bottom: 2px;
  top: auto;
  height: 9px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: transparent;
}

.tab .food-icon::after {
  right: 2px;
  left: auto;
  top: 0;
  width: 2px;
  height: 15px;
  border: 0;
  border-radius: 0;
  background: currentColor;
  transform: rotate(28deg);
  box-shadow: -5px 2px 0 currentColor;
}

.tab .camera-icon::before {
  left: 2px;
  right: 2px;
  bottom: 3px;
  top: auto;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 4px;
  background: transparent;
}

.tab .camera-icon::after {
  left: 7px;
  top: 8px;
  width: 6px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
  transform: none;
  box-shadow: -2px -8px 0 -3px currentColor;
}

.tab .source-icon::before {
  inset: 2px 3px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: transparent;
}

.tab .source-icon::after {
  left: 7px;
  right: 6px;
  top: 6px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}
