:root {
  --bg: #dff5fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --border: #e5e7eb;
  --spot: #e11d48;
  --stop: #0f766e;
  --route: #64748b;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body { overscroll-behavior: none; }
.app-shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: calc(env(safe-area-inset-top) + 10px) 12px 10px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
}
.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
.toolbar-row {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.time-picker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.daytype-picker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.time-picker-wrap label {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}
.time-picker-wrap select {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: #fff;
}
.ghost-button, .icon-button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}
.ghost-button {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.84rem;
  white-space: nowrap;
}
.icon-button {
  border-radius: 999px;
  width: 38px;
  height: 38px;
  font-size: 1.35rem;
  line-height: 1;
}
.filter-button,
.today-button {
  border-radius: 12px;
  width: 42px;
  height: 42px;
}
.icon-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 106px;
  height: 42px;
  padding: 8px 12px;
}
.button-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}
.icon-button .button-icon {
  width: 20px;
  height: 20px;
  margin: 0 auto;
}
.button-label {
  font-weight: 600;
}
main {
  position: relative;
  flex: 1;
  min-height: 0;
}
#map {
  height: 100%;
  width: 100%;
}
.floating-legend {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(env(safe-area-inset-bottom) + 10px);
  z-index: 700;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  color: var(--muted);
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.dot-spot { background: var(--spot); }
.dot-spot-checked { background: #f97316; }
.dot-stop { background: var(--stop); }
.dot-fukuchari { background: #2563eb; }
.bus-location-sample {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #d32f2f;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
  background: #ef5350;
}
.legend-pin {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
  object-fit: contain;
}
.line-sample {
  display: inline-block;
  width: 18px;
  height: 3px;
  background: var(--route);
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}
.modal.open {
  display: block;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}
.modal-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(74dvh, 560px);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  background: rgba(255,255,255,0.99);
  box-shadow: var(--shadow);
  padding: 8px 14px calc(env(safe-area-inset-bottom) + 16px);
  overflow: hidden;
}
.modal-handle {
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: #d1d5db;
  margin: 4px auto 10px;
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.modal-header h2 {
  margin: 0;
  font-size: 1rem;
}
.modal-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.candidate-list {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  max-height: calc(min(74dvh, 560px) - 110px);
}
.candidate-list.empty {
  color: var(--muted);
  font-size: 0.9rem;
}
.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}
.candidate-name {
  font-weight: 700;
  font-size: 0.96rem;
  margin-bottom: 8px;
}
.meta-grid {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}
.info-card .jump-button {
  display: block;
  margin-top: 10px;
  width: 100%;
  border: 0;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  text-decoration: none;
}
.popup-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.route-button, .checkin-button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 0.88rem;
}
.route-button {
  background: var(--accent-soft);
  color: var(--accent);
}
.checkin-button {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}
.map-popup-title {
  font-weight: 700;
  margin-bottom: 4px;
}
.map-popup-meta {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.leaflet-popup-content {
  margin: 10px 12px;
}
@media (min-width: 768px) {
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }
  .floating-legend {
    left: auto;
    right: 16px;
    width: auto;
    max-width: 360px;
  }
  .modal-sheet {
    left: auto;
    right: 16px;
    width: min(420px, 92vw);
    bottom: 16px;
    border-radius: 24px;
  }
}


.route-button {
  margin-top: 8px;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  background: #2563eb;
  color: #fff;
}

.route-button:disabled {
  opacity: 0.7;
}

.place-row {
  margin-top: 8px;
}
.place-picker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.place-picker-wrap label {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}
.place-picker-wrap select {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: #fff;
}
.filter-button {
  flex: 0 0 auto;
}
.filter-sheet {
  max-height: min(46dvh, 340px);
}
.filter-form {
  display: grid;
  gap: 10px;
  padding-bottom: 6px;
}
.filter-form label {
  font-size: 0.88rem;
  color: var(--muted);
}
.filter-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.96rem;
}
.filter-actions {
  display: flex;
  justify-content: flex-end;
}
.primary-button {
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 0.92rem;
  font-weight: 600;
}
.route-button {
  margin-top: 10px;
  width: 100%;
  border: 0;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 0.9rem;
}

.title-block {
  min-width: 0;
}
.time-picker-wrap,
.place-picker-wrap {
  min-width: 0;
}
.time-picker-wrap select,
.place-picker-wrap select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: #fff;
}
.place-row {
  align-items: stretch;
}
.place-picker-wrap {
  flex: 1;
}
.filter-button {
  flex: 0 0 38px;
  align-self: center;
}
.filter-sheet {
  left: 12px;
  right: 12px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
  border-radius: 22px;
  padding-bottom: 16px;
}
.filter-form {
  display: grid;
  gap: 10px;
}
.filter-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 0.95rem;
}
.filter-actions {
  display: flex;
  justify-content: stretch;
}
.primary-button {
  width: 100%;
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  padding: 11px 12px;
  font-weight: 600;
  font-size: 0.95rem;
}
@media (max-width: 420px) {
  .topbar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .toolbar-row {
    gap: 6px;
  }
  .ghost-button {
    padding: 10px 10px;
    font-size: 0.8rem;
  }
}


.schedule-block {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.schedule-title {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #334155;
}
.schedule-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.schedule-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.schedule-badge {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.76rem;
  flex: 0 0 auto;
  margin-top: 1px;
}
.schedule-lines {
  display: grid;
  gap: 3px;
  font-size: 0.84rem;
  color: #334155;
}
.schedule-label {
  display: inline-block;
  min-width: 2.8em;
  color: var(--muted);
  margin-right: 6px;
}
.schedule-empty {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.daytype-picker-wrap,
.time-picker-wrap {
  flex: 1;
}
.daytype-picker-wrap select,
.time-picker-wrap select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: #fff;
}
.ghost-button:disabled,
.icon-button:disabled,
select:disabled {
  opacity: 0.7;
}

.today-button {
  flex: 0 0 38px;
  align-self: center;
}
.today-sheet {
  left: 12px;
  right: 12px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  max-height: min(68dvh, 520px);
  border-radius: 22px;
  padding-bottom: 16px;
}
.today-checkins-list {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  max-height: calc(min(68dvh, 520px) - 112px);
}
.today-checkins-list.empty {
  display: block;
}
.today-empty {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  padding: 6px 2px;
}
.today-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}
.today-card-main {
  display: grid;
  gap: 4px;
}
.today-card-name {
  font-weight: 700;
  font-size: 0.96rem;
}
.today-card-time {
  color: var(--muted);
  font-size: 0.84rem;
}

.today-modal-actions {
  margin-bottom: 10px;
}
.today-modal-actions .primary-button {
  width: 100%;
}

.wishlist-button {
  width: 100%;
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 0.88rem;
  background: #f0fdf4;
  color: #166534;
}

.plan-sheet {
  left: 12px;
  right: 12px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  max-height: min(74dvh, 560px);
  border-radius: 22px;
  padding-bottom: 16px;
}

.plan-list {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  max-height: calc(min(74dvh, 560px) - 110px);
}

.plan-list.empty {
  display: block;
}

.plan-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}

.plan-card-name {
  font-weight: 700;
  font-size: 0.96rem;
  margin-bottom: 8px;
}

.plan-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.plan-hour-caption {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.plan-hour-select {
  width: auto;
  min-width: 110px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.9rem;
  background: #fff;
}

.plan-next-departure {
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.plan-next-title {
  font-weight: 700;
  margin-bottom: 2px;
}

.plan-next-operator {
  margin-bottom: 2px;
}

.plan-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.plan-actions .jump-button {
  flex: 1;
}

.plan-row .ghost-button.mini {
  width: 34px;
  padding: 8px 0;
  text-align: center;
}

.plan-actions .checkin-button.mini {
  min-width: 58px;
}

.plan-row .ghost-button.mini,
.plan-actions .checkin-button.mini {
  white-space: nowrap;
}

.ghost-button.mini,
.checkin-button.mini {
  gap: 8px;
  padding: 8px 10px;
  font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   Pop theme inspired by the provided reference app screens
   -------------------------------------------------------------------------- */
:root {
  --bg: #eaf6f1;
  --bg-line: rgba(116, 158, 145, 0.12);
  --card: #fbfdfb;
  --text: #152521;
  --muted: #71817c;
  --accent: #1e63b8;
  --accent-soft: #e6f0fb;
  --accent-strong: #0f57aa;
  --border: #cfe1da;
  --spot: #ff3159;
  --stop: #178a72;
  --route: #6e817a;
  --yellow: #ffe96f;
  --green-chip: #dff2e8;
  --shadow: 0 18px 36px rgba(39, 79, 67, 0.18);
  --soft-shadow: 0 10px 22px rgba(39, 79, 67, 0.12);
}

html,
body {
  background: #dff5fb;
  color: var(--text);
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", "YuGothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
}

.app-shell {
  background: #dff5fb;
}

.topbar {
  margin: 10px 10px 0;
  padding: calc(env(safe-area-inset-top) + 12px) 14px 14px;
  border: 1px solid rgba(207, 225, 218, 0.88);
  border-radius: 0 0 28px 28px;
  background: rgba(251, 253, 251, 0.86);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(14px) saturate(1.2);
}

.language-switch {
  margin-bottom: 8px !important;
  letter-spacing: 0.16em;
  font-weight: 900;
}

.language-switch a {
  color: #82938d !important;
}

.language-switch a.active {
  color: var(--accent-strong) !important;
  text-decoration: none !important;
}

.title-block {
  position: relative;
  padding-left: 38px;
}

.title-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  background: url("./images/pin5.png") center / contain no-repeat;
}

.topbar h1 {
  font-size: clamp(1.22rem, 4.2vw, 1.65rem);
  font-weight: 950;
  letter-spacing: 0.06em;
  color: var(--text);
}

.topbar p {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.toolbar-row {
  gap: 9px;
  margin-top: 12px;
}

.daytype-picker-wrap,
.time-picker-wrap,
.place-picker-wrap {
  position: relative;
}

.daytype-picker-wrap::after,
.time-picker-wrap::after,
.place-picker-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #7b8d86;
  border-bottom: 2px solid #7b8d86;
  transform: translateY(-62%) rotate(45deg);
  pointer-events: none;
}

.daytype-picker-wrap select,
.time-picker-wrap select,
.place-picker-wrap select,
.filter-form input,
.plan-hour-select {
  appearance: none;
  border: 2px solid #c6d8d1;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: inset 0 -2px 0 rgba(27, 55, 48, 0.05);
  color: var(--text);
  font-weight: 800;
}

.daytype-picker-wrap select,
.time-picker-wrap select,
.place-picker-wrap select {
  padding-right: 34px;
}

.icon-button,
.ghost-button,
.primary-button,
.route-button,
.checkin-button,
.wishlist-button,
.info-card .jump-button {
  font-family: inherit;
  font-weight: 900;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 0 rgba(27, 55, 48, 0.08);
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.icon-button:active,
.ghost-button:active,
.primary-button:active,
.route-button:active,
.checkin-button:active,
.wishlist-button:active,
.info-card .jump-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(27, 55, 48, 0.07);
}

.icon-button,
.ghost-button {
  border: 2px solid #c6d8d1;
  background: rgba(255,255,255,0.96);
  color: var(--text);
}

.primary-button,
.route-button,
.info-card .jump-button {
  border: 0;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: 999px;
}

.checkin-button {
  border: 2px solid #ffd7a8;
  background: #fff7df;
  color: #a45b00;
  border-radius: 999px;
}

.wishlist-button {
  border: 2px solid #bce8ca;
  background: var(--green-chip);
  color: #20725b;
  border-radius: 999px;
}

main {
  padding: 12px 10px calc(env(safe-area-inset-bottom) + 10px);
}

#map {
  height: 100%;
  min-height: 260px;
  border: 3px solid rgba(255,255,255,0.76);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #f8fbf9;
}

.leaflet-control-zoom a {
  color: var(--text) !important;
  font-weight: 950;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border-radius: 18px;
  background: rgba(251, 253, 251, 0.98);
  box-shadow: var(--shadow);
}

.leaflet-popup-content .map-popup-title,
.map-popup-title {
  font-size: 1rem;
  font-weight: 950;
  color: var(--text);
}

.leaflet-popup-content .map-popup-meta,
.map-popup-meta {
  color: var(--muted);
  font-weight: 700;
}

.floating-legend {
  left: 18px;
  right: 18px;
  bottom: calc(env(safe-area-inset-bottom) + 22px);
  gap: 8px;
  padding: 10px;
  border: 2px solid rgba(207, 225, 218, 0.86);
  border-radius: 22px;
  background: rgba(251, 253, 251, 0.78);
  color: #5c7069;
  font-weight: 800;
  box-shadow: var(--soft-shadow);
}

.floating-legend > div {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(236, 246, 241, 0.88);
}

.modal-backdrop {
  background: rgba(21, 37, 33, 0.36);
  backdrop-filter: blur(3px);
}

.modal-sheet {
  left: 10px;
  right: 10px;
  bottom: calc(env(safe-area-inset-bottom) + 10px);
  border: 3px solid rgba(255,255,255,0.74);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(249,253,251,0.98)),
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(116,158,145,0.08) 11px 14px);
  box-shadow: var(--shadow);
}

.filter-sheet,
.today-sheet,
.plan-sheet {
  border-radius: 30px;
}

.modal-handle {
  width: 56px;
  height: 7px;
  background: #c8dbd4;
}

.modal-header h2 {
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.modal-header p {
  color: var(--muted);
  font-weight: 700;
}

.candidate-list,
.today-checkins-list,
.plan-list {
  gap: 14px;
  padding-right: 2px;
}

.info-card,
.today-card,
.plan-card {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 16px 20px;
  border: 2px solid rgba(207, 225, 218, 0.7);
  border-radius: 24px;
  background: rgba(251,253,251,0.96);
  box-shadow: var(--soft-shadow);
}

.info-card::before,
.today-card::before,
.plan-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  background: linear-gradient(180deg, var(--spot), #ff6f89);
}

.info-card::after,
.today-card::after,
.plan-card::after {
  content: "";
  position: absolute;
  right: 22%;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #dfeee8;
  box-shadow: 0 calc(100% + 112px) 0 #dfeee8;
  opacity: 0.9;
}

.candidate-name,
.today-card-name,
.plan-card-name {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 950;
  letter-spacing: 0.03em;
}

.meta-grid,
.today-card-time,
.plan-next-departure,
.schedule-lines,
.schedule-empty,
.today-empty {
  color: var(--muted);
  font-weight: 700;
}

.meta-grid > div,
.schedule-label,
.plan-hour-caption {
  color: #6d7e78;
}

.schedule-block,
.plan-next-departure {
  border: 0;
  background: rgba(232, 242, 237, 0.78);
  border-radius: 18px;
}

.schedule-title {
  color: var(--accent-strong);
  font-weight: 950;
  letter-spacing: 0.12em;
}

.schedule-badge {
  background: var(--yellow);
  color: var(--text);
  box-shadow: 0 2px 0 rgba(27,55,48,0.08);
}

.info-card .jump-button,
.route-button,
.checkin-button,
.wishlist-button {
  padding: 11px 14px;
  text-decoration: none;
}

.popup-actions-compact .popup-action-button,
.route-button.popup-compact-button {
  border-radius: 999px !important;
}

.filter-form label {
  color: var(--accent-strong);
  font-weight: 950;
  letter-spacing: 0.12em;
}

.primary-button {
  background: var(--accent-strong);
  color: #fff;
}

.plan-actions .jump-button {
  border-radius: 999px;
}

@media (min-width: 768px) {
  .app-shell {
    max-width: 1040px;
    margin: 0 auto;
  }
  .topbar {
    margin-top: 14px;
    border-radius: 28px;
  }
  main {
    padding: 14px 14px calc(env(safe-area-inset-bottom) + 14px);
  }
  .floating-legend {
    right: 34px;
    bottom: calc(env(safe-area-inset-bottom) + 34px);
    max-width: 400px;
  }
  .modal-sheet {
    right: 28px;
    bottom: 28px;
    border-radius: 30px;
  }
}

@media (max-width: 420px) {
  .topbar {
    margin-left: 8px;
    margin-right: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }
  main {
    padding-left: 8px;
    padding-right: 8px;
  }
  .topbar p {
    font-size: 0.74rem;
  }
  .toolbar-row {
    gap: 7px;
  }
  .floating-legend {
    left: 14px;
    right: 14px;
  }
}


/* Footer information tile below the map */
main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.map-area {
  position: relative;
  flex: 1 1 auto;
  min-height: 260px;
}

.footer-tile {
  flex: 0 0 auto;
  margin: 0 2px;
  padding: 12px 14px calc(env(safe-area-inset-bottom) + 12px);
  border: 2px solid rgba(207, 225, 218, 0.92);
  border-radius: 22px;
  background: rgba(251, 253, 251, 0.94);
  box-shadow: var(--soft-shadow);
  color: #5c7069;
}

.footer-description {
  margin: 0 0 10px;
  color: #5c7069;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.65;
}

.footer-info {
  display: grid;
  gap: 8px;
  margin: 0;
}

.footer-info > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-info dt {
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-chip);
  color: #20725b;
  font-size: 0.76rem;
  font-weight: 950;
  white-space: nowrap;
}

.footer-info dd {
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 850;
}

.footer-info a {
  color: var(--accent-strong);
  font-weight: 950;
  text-decoration: none;
  border-bottom: 2px solid rgba(36, 98, 188, 0.28);
}

.footer-info a:focus-visible,
.footer-info a:hover {
  border-bottom-color: var(--accent-strong);
}

@media (min-width: 760px) {
  .footer-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Small-screen map usability: keep the map tile as tall as possible on iPhone SE-class screens */
@media (max-width: 420px) {
  .app-shell {
    height: auto;
    min-height: 100svh;
  }

  .topbar {
    position: static;
    padding-top: calc(env(safe-area-inset-top) + 8px);
    padding-bottom: 8px;
  }

  .language-switch {
    margin-bottom: 3px;
    font-size: 0.72rem;
  }

  .topbar h1 {
    font-size: 0.96rem;
  }

  .toolbar-row {
    margin-top: 7px;
    gap: 6px;
  }

  .toolbar-action-button,
  .filter-button,
  .today-button {
    width: 38px;
    height: 38px;
  }

  .time-picker-wrap select,
  .daytype-picker-wrap select,
  .place-picker-wrap select {
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 0.86rem;
  }

  main {
    padding-top: 8px;
    padding-bottom: max(env(safe-area-inset-bottom), 8px);
    gap: 8px;
  }

  .map-area {
    flex: 0 0 auto;
    min-height: max(360px, 62svh);
  }

  #map {
    min-height: max(360px, 62svh);
    border-width: 2px;
    border-radius: 22px;
  }

  .floating-legend {
    left: 10px;
    right: 10px;
    bottom: 10px;
    gap: 5px;
    padding: 7px;
    border-radius: 18px;
    font-size: 0.68rem;
  }

  .floating-legend > div {
    min-height: 24px;
    padding: 3px 6px;
  }

  .legend-pin {
    width: 15px;
    height: 15px;
    margin-right: 4px;
  }

  .footer-tile {
    padding: 9px 11px calc(env(safe-area-inset-bottom) + 9px);
    border-radius: 18px;
  }

  .footer-description {
    margin-bottom: 7px;
    font-size: 0.72rem;
    line-height: 1.45;
  }

  .footer-info {
    gap: 5px;
  }

  .footer-info > div {
    gap: 6px;
  }

  .footer-info dt {
    padding: 3px 8px;
    font-size: 0.68rem;
  }

  .footer-info dd {
    font-size: 0.76rem;
  }
}

@media (max-width: 380px) and (max-height: 700px) {
  .map-area,
  #map {
    min-height: max(390px, 68svh);
  }
}

/* Make the "行きたい目的地の計画" modal use the same bottom-sheet height/position as the destination candidate modal. */
.plan-sheet {
  left: 10px;
  right: 10px;
  top: auto;
  bottom: calc(env(safe-area-inset-bottom) + 10px);
  transform: none;
  max-height: min(74dvh, 560px);
  border-radius: 30px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
}

.plan-list {
  max-height: calc(min(74dvh, 560px) - 110px);
}

@media (min-width: 720px) {
  .plan-sheet {
    right: 28px;
    bottom: 28px;
  }
}

/* Make the "今日周遊した目的地" modal use the same bottom-sheet height/position as the destination candidate modal. */
.today-sheet {
  left: 10px;
  right: 10px;
  top: auto;
  bottom: calc(env(safe-area-inset-bottom) + 10px);
  transform: none;
  max-height: min(74dvh, 560px);
  border-radius: 30px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
}

.today-checkins-list {
  max-height: calc(min(74dvh, 560px) - 160px);
}

@media (min-width: 720px) {
  .today-sheet {
    right: 28px;
    bottom: 28px;
  }
}


/* Current location cursor */
.current-location-cursor {
  width: 24px !important;
  height: 24px !important;
  margin-left: -12px !important;
  margin-top: -12px !important;
  position: relative;
  pointer-events: none;
}

.current-location-cursor-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #0b7cff;
  box-shadow: 0 2px 8px rgba(0, 52, 122, 0.35);
  transform: translate(-50%, -50%);
  z-index: 2;
}

.current-location-cursor-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(11, 124, 255, 0.24);
  transform: translate(-50%, -50%);
  animation: currentLocationPulse 1.8s ease-out infinite;
  z-index: 1;
}

@keyframes currentLocationPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0.75;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

.toolbar-action-button.is-loading .button-icon {
  opacity: 0.55;
}
